home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / dos / communic / ckit176c / ckit.doc < prev    next >
Encoding:
Text File  |  1991-04-06  |  162.4 KB  |  4,039 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.                        CKIT DOOR building Toolkit Library
  14.  
  15.                                   Version 1.76C
  16.  
  17.  
  18.  
  19.                                 Reference Manual
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.                                  Distributed By
  30.  
  31.                          Data-Comp Information Systems
  32.                                  P.O. Box 5895
  33.                           Maryville, Tenn. 37802-5895
  34.  
  35.  
  36.               (615) 982-6537   (Hayes Ultra V.32, public line)
  37.               (615) 982-8723   (Hayes Ultra V.32, private line)
  38.               (615) 982-6512 (USR HST Dual Standard V.32, private line)
  39.               (615) 970-7418 (USR HST Dual Standard V.32, private line)
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.                                     Copyright (c) 1990 Rickie W. Belitz
  61.  
  62.  
  63.  
  64.  
  65.                                                               Introduction
  66.  
  67.                                    Introduction
  68.  
  69.        CKIT Library is an extensive library of C runtime routines that
  70.        allow easy door program implementation using PCBoard 12.0 through
  71.        14.x, WILDCAT! systems, (all versions), GAP BBS, SPITFIRE BBS
  72.        and other systems using standard DOOR.SYS file along with RBBS-PC,
  73.        QuickBBS, Remote Access and other systems using DORINFOx.DEF files.
  74.        In addition,  CKIT  will also utilize a file called GENERIC.SYS.
  75.        This file will allow CKIT to work on ANY BBS system.  See section
  76.        on GENERIC.SYS for more information.
  77.  
  78.        Some of CKIT Library's features include interrupt driven I/O,
  79.        16550AN UART support,provides information available from the
  80.        PCBoard .sys files, database files, multi-node support (file sharing),
  81.        multi-BBS support, local sysop function keys and many more utilities
  82.        are included for the door author.
  83.  
  84.        The CKIT Library routines are written in Assembly language using
  85.        SLR's Optasm and MSC 6.0. The routines are compatible with Microsoft C,
  86.        Microsoft QuickC, TURBO C, and TURBO C++.
  87.  
  88.        CKIT Library supports the small, and medium models.
  89.  
  90.  
  91.        Microsoft is a registered trademark, and QuickC is a trademark of
  92.        the Microsoft Corporation.
  93.  
  94.        TURBO C   is a registered trademark of Borland International Inc.
  95.  
  96.        TURBO C++ is a registered trademark of Borland International Inc.
  97.  
  98.        PCBoard   is a registered trademark of Clark Development Company.
  99.  
  100.        WILDCAT!  is a registered trademark of Mustang Software.
  101.  
  102.        SPITFIRE  is a registered trademark of Buffalo Creek Software
  103.  
  104.        RBBS-PC   is copyright (c) Tom Mack,  Capital PC Software Exchange
  105.  
  106.        QUICKBBS  is copyright (c) Adam Hudson
  107.  
  108.        REMOTE ACCESS is copyright (c) Andrew Milner, Continental Software
  109.  
  110.  
  111.                                                            Registration
  112.  
  113.        The unregistered library will display "Unregistered copy etc." as
  114.        part of the signoff message. The registered version eliminates this
  115.        signoff msg at the time the door is closed.  Please see the
  116.        registration information  below.  A lot of effort has gone into CKIT,
  117.        to make sure it would operate reliably and with little effort
  118.        on the part of the door author.  If find the program of use, please
  119.        register it and help support the Shareware method of program
  120.        distribution.   Registering will also help fund further development
  121.        of the libraries.
  122.  
  123.        CKIT is being distributed as Shareware.
  124.  
  125.        The registration includes:
  126.  
  127.          ∙    A disk with the latest version of CKIT, registered to you.
  128.  
  129.          ∙    Self-Registration program for future releases of CKIT
  130.  
  131.          ∙    Technical support via electronic mail
  132.  
  133.          .    A LARGE memory model of CKIT.  (download from Data-Comp BBS)
  134.  
  135.         For more information see the addresses, phone numbers listed
  136.         at the end of this document.
  137.  
  138.                                                           Global Variables
  139.  
  140.                    Global Variables used by all systems
  141.  
  142.        The CKIT Library defines a  number of variables in the ckit.h
  143.        header  file.    Through  proper use,  these  variables  allow  the
  144.        programmer  to customize  the CKIT  Library  functions to  meet
  145.        particular application program's needs.
  146.  
  147.        DUMP_USER
  148.        -------------------------------------------------------------------
  149.        Defined As:    short DUMP_USER;
  150.  
  151.        Description:   This variable will be set if the user hangs up,
  152.                       his/her time runs out, carrier is lost, or if the
  153.                       sysop wants to return the user to the BBS system using
  154.                       function key F8.  You should check this flag in all
  155.                       major loops in the door program.
  156.  
  157.  
  158.        FORCEOFFHOOK
  159.        -------------------------------------------------------------------
  160.        Defined As:    short FORCEOFFHOOK
  161.  
  162.        Description:   This variable should be set to TRUE or FALSE in the
  163.                       CKIT.H file.  If this variable is TRUE, the modem
  164.                       will be placed OFF-HOOK if carrier is dropped in the
  165.                       door before returning to the system.  If FORCEOFFHOOK
  166.                       is false, the door will not take the modem off-hook.
  167.                       See CKIT.H
  168.  
  169.        USERFILE
  170.        -------------------------------------------------------------------
  171.        Defined As:    short USERSFILE
  172.  
  173.        Description:   This variable should be set to TRUE or FALSE in the
  174.                       CKIT.H file.  If this variable is TRUE, CKIT will
  175.                       open the Users file and those variables will be
  176.                       available.  If not, only the PCBOARD.SYS file will be
  177.                       opened and the user information will not be available.
  178.                       See CKIT.H.
  179.  
  180.        option
  181.        ------------------------------------------------------------------
  182.        Defined As:    unsigned char option;
  183.  
  184.        Description:   This variable is set to indicate how the user was
  185.                       logged off the system.  There are 5 macro's in the
  186.                       CKIT header file that describes each.
  187.                THIS INFORMATION IS AVAILABLE ONLY AFTER YOU CALL CLOSE_DOOR();
  188.  
  189.                         #define     EXITDOOR    0  Normal door exit
  190.                         #define     NOCARRIER   1  Dropped carrier*
  191.                         #define     TIMEOUT     2  Keyboard timeout*
  192.                         #define     SYSOP_O     3  Sysop request*
  193.                         #define     SYSTEMTIME  4  System time expired*
  194.                         #define     LOGOFF      5  User logged off*
  195.  
  196.                        * These are normally handled internally by CKIT
  197.  
  198.                                           COMPATIBILITY   Global Variables
  199.  
  200.        logoff_color            pcboard.sys door.sys wildcat! dorinfox.def
  201.        ------------------------------------------------------------------
  202.        Defined As:    short logoff_color;
  203.  
  204.        Description:   This variable used to specifiy the color of the
  205.                       exit_msg[] string. (See below).
  206.                       See the ckit.h file for colors available.
  207.  
  208.         Example:      logoff_color = (green).
  209.  
  210.         NOTE:         If not specified, the default color is violet.
  211.  
  212.  
  213.  
  214.        exit_msg                pcboard.sys door.sys wildcat! dorinfox.def
  215.        ------------------------------------------------------------------
  216.        Defined As:    char  exit_msg[40];
  217.  
  218.        Description:   This should be a NULL terminated C string.
  219.                       This is used to specify the exit back to BBS msg.
  220.                       MAX. 40 CHARS!
  221.  
  222.         Example:   strcpy(exit_msg, "Returning to system, Please wait...");
  223.  
  224.         NOTE:      If not specified, the default message is the same as above.
  225.  
  226.  
  227.        logoff_msg              pcboard.sys door.sys wildcat! dorinfox.def
  228.        ------------------------------------------------------------------
  229.        Defined As:    char  logoff_msg[40];
  230.  
  231.        Description:   This should be a NULL terminated C string.
  232.                       This is used to specify the logoff message desired.
  233.                       MAX. 40 CHARS!
  234.  
  235.         Example:   strcpy(exit_msg, "Thanks for calling! ...");
  236.  
  237.         NOTE:      If not specified, the default message is the same as above.
  238.  
  239.        display                            pcboard.sys
  240.        ------------------------------------------------------------------
  241.        Defined As:    short display;
  242.  
  243.        Description:   This variable is set to indicate the status of the
  244.                       local BBS display.
  245.                       file.  TRUE/FALSE   0 = No,  1 = yes.
  246.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  247.  
  248.        printer                            pcboard.sys
  249.        ------------------------------------------------------------------
  250.        Defined As:    short printer;
  251.  
  252.        Description:   This variable is set to indicate the status of the
  253.                       BBS printer.
  254.                       TRUE/FALSE   0 = No,  1 = yes.
  255.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  256.  
  257.                                           COMPATIBILITY   Global Variables
  258.  
  259.        pagebell                           pcboard.sys
  260.        ------------------------------------------------------------------
  261.        Defined As:    short pagebell;
  262.  
  263.        Description:   This variable is set to indicate the status of the
  264.                       BBS pagebell.
  265.                       TRUE/FALSE   0 = No,  1 = yes.
  266.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  267.  
  268.  
  269.        callalarm                          pcboard.sys
  270.        ------------------------------------------------------------------
  271.        Defined As:    short callalarm;
  272.  
  273.        Description:   This variable is set to indicate the status of the
  274.                       BBS  caller alarm.
  275.                       TRUE/FALSE   0 = No,  1 = yes.
  276.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  277.  
  278.        PCB                                pcboard.sys
  279.        ------------------------------------------------------------------
  280.        Defined As:    short PCB;
  281.  
  282.        Description:   This variable is set to indicate whether CKIT found
  283.                       a PCBoard.sys file.
  284.                       TRUE/FALSE   0 = No,  1 = yes.
  285.  
  286.        PCB12                              pcboard.sys   wildcat!
  287.        ------------------------------------------------------------------
  288.        Defined As:    short PCB12;
  289.  
  290.        Description:   This variable is set to indicate whether CKIT found
  291.                       a PCBoard version 12.0 pcboard.sys file or not.
  292.                       TRUE/FALSE   0 = No,  1 = yes.
  293.  
  294.        WILDCAT                            pcboard.sys   wildcat!
  295.        ------------------------------------------------------------------
  296.        Defined As:    short WILDCAT;
  297.  
  298.        Description:   This variable is set to indicate whether CKIT found
  299.                       a WILDCAT callinfo.bbs file or not.
  300.                       TRUE/FALSE   0 = No,  1 = yes.
  301.  
  302.        RBBS                               RBBS-PC       dorinfox.def
  303.        ------------------------------------------------------------------
  304.        Defined As:    short RBBS;
  305.  
  306.        Description:   This variable is set to indicate whether CKIT found
  307.                       a RBBS type DORINFOx.DEF file or not.
  308.                       TRUE/FALSE   0 = No,  1 = yes.
  309.  
  310.        GENERIC                                       any BBS system
  311.        ------------------------------------------------------------------
  312.        Defined As:    short GENERIC;
  313.  
  314.        Description:   This variable is set to indicate whether CKIT found
  315.                       a GENERIC.SYS file.
  316.                       TRUE/FALSE   0 = No,  1 = yes.
  317.  
  318.                                           COMPATIBILITY   Global Variables
  319.  
  320.        graphics                pcboard.sys door.sys wildcat! dorinfox.def
  321.        ------------------------------------------------------------------
  322.        Defined As:    short graphics;
  323.  
  324.        Description:   This variable is set to indicate the status of the
  325.                       user graphics mode.
  326.                       Supports ANSI X3.64 standard commands.
  327.                       TRUE/FALSE   0 = No,  1 = yes.
  328.  
  329.        error_connection             pcboard.sys door.sys wildcat!
  330.        ------------------------------------------------------------------
  331.        Defined As:    short error_connection;
  332.  
  333.        Description:   This variable is set to indicate the status of the
  334.                       modem error_connection.
  335.                       TRUE/FALSE   0 = No,  1 = yes.
  336.  
  337.        local                   pcboard.sys door.sys wildcat! dorinfox.def
  338.        ------------------------------------------------------------------
  339.        Defined As:    short local;
  340.  
  341.        Description:   This variable is set to indicate the status of the
  342.                       local/remote operation of door.
  343.                       TRUE/FALSE   0 = No,  1 = yes.
  344.  
  345.        expert                             pcboard.sys door.sys
  346.        ------------------------------------------------------------------
  347.        Defined As:    short expert;
  348.  
  349.        Description:   This variable is set to indicate the status of the
  350.                       expert/novice mode of user.
  351.                       TRUE/FALSE   0 = No,  1 = yes.
  352.  
  353.        event_active                       pcboard.sys
  354.        ------------------------------------------------------------------
  355.        Defined As:    short event_active;
  356.  
  357.        Description:   This variable is set to indicate the status of the
  358.                       system event.
  359.                       TRUE/FALSE   0 = No,  1 = yes.
  360.                       Useful with  14.x pcboard.sys usage only
  361.  
  362.        slide_event                        pcboard.sys
  363.        ------------------------------------------------------------------
  364.        Defined As:    short slide_event;
  365.  
  366.        Description:   This variable is set to indicate whether the system
  367.                       event can be moved or not.
  368.                       TRUE/FALSE   0 = No,  1 = yes.
  369.                       Useful with 14.x pcboard.sys useage only
  370.  
  371.        sysop_next                         pcboard.sys
  372.        ------------------------------------------------------------------
  373.        Defined As:    char  sysop_next[2];
  374.  
  375.        Description:   This C string indicates the status of the
  376.                       Sysop Next flag.  N = sysop next, X = exit to system,
  377.                       space = nothing pending.
  378.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  379.  
  380.                                           COMPATIBILITY   Global Variables
  381.  
  382.        netchat                            pcboard.sys
  383.        ------------------------------------------------------------------
  384.        Defined As:    char  netchat[2];
  385.  
  386.        Description:   This C string indicates the status of the
  387.                       the user's netchat.  U = Unavailable,
  388.                       A = available.
  389.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  390.  
  391.        aport                   pcboard.sys door.sys wildcat! dorinfox.def
  392.        ------------------------------------------------------------------
  393.        Defined As:    char  aport[2];
  394.  
  395.        Description:   This C string is an ASCII string of the com
  396.                        port in use as determined.
  397.                        See also port.
  398.  
  399.        bps_open                     pcboard.sys door.sys wildcat!
  400.        ------------------------------------------------------------------
  401.        Defined As:    char  bps_open[6];
  402.  
  403.        Description:   This C string is an ASCII string of the
  404.                       BBS's DTE to modem baud rate.
  405.                       Not available with PCBoard 12.0
  406.  
  407.  
  408.        baud_rate               pcboard.sys door.sys wildcat! dorinfox.def
  409.        ------------------------------------------------------------------
  410.        Defined As:    char  baud_rate[6];
  411.  
  412.        Description:   This C string is an ASCII string of the
  413.                       callers baud rate.
  414.  
  415.        firstname               pcboard.sys door.sys wildcat! dorinfox.def
  416.        ------------------------------------------------------------------
  417.        Defined As:    char  firstname[16];
  418.  
  419.        Description:   This C string is an ASCII string of the
  420.                       caller first name.
  421.  
  422.        password                     pcboard.sys door.sys wildcat!
  423.        ------------------------------------------------------------------
  424.        Defined As:    char  password[13];
  425.  
  426.        Description:   This C string is an ASCII string of the
  427.                       caller password.
  428.  
  429.        fullname                pcboard.sys door.sys wildcat! dorinfox.def
  430.        ------------------------------------------------------------------
  431.        defined As:    char  fullname[26];
  432.  
  433.        Description:   This C string is an ASCII string of the
  434.                       caller fullname.
  435.  
  436.                                           COMPATIBILITY   Global Variables
  437.  
  438.        page_length             pcboard.sys door.sys wildcat! dorinfox.def
  439.        ------------------------------------------------------------------
  440.        Defined As:    BYTE  page_length;
  441.  
  442.        Description:   Page length of user.  This information is not
  443.                       available with PCBoard 12.0 so there is a default
  444.                       of 23.  The door author can adjust as desired.
  445.                       This is also used by display_file().  Setting to
  446.                       0 equals continous. (NON-STOP).
  447.  
  448.        language                           pcboard.sys
  449.        ------------------------------------------------------------------
  450.        defined As:    char  language[5];
  451.  
  452.        Description:   This C string is an ASCII string of the
  453.                       caller language.
  454.                       Space = English
  455.  
  456.        time_logged                  pcboard.sys door.sys wildcat!
  457.        ------------------------------------------------------------------
  458.        defined As:    char  time_logged[6];
  459.  
  460.        Description:   This C string is an ASCII string of the time
  461.                       caller logged onto the BBS.
  462.  
  463.        event_time                         pcboard.sys door.sys
  464.        ------------------------------------------------------------------
  465.        defined As:    char  event_time[6];
  466.  
  467.        Description:   This C string is an ASCII string of the
  468.                       system event time of the BBS as HH:MM.
  469.                       Not available with PCBoard 12.0
  470.  
  471.  
  472.        time_on                            pcboard.sys
  473.        ------------------------------------------------------------------
  474.        Defined As:    short time_on;
  475.  
  476.        Description:   This variable indicates the time in minutes
  477.                       past midnight the user logged on.
  478.  
  479.        prev_used                          pcboard.sys
  480.        ------------------------------------------------------------------
  481.        Defined As:    short prev_used;      NOTE: N/A for PCBoard 12.0
  482.  
  483.        Description:   This variable indicates the time in minutes
  484.                       used in previous calls today.
  485.  
  486.        user_record                  pcboard.sys door.sys wildcat!
  487.        ------------------------------------------------------------------
  488.        Defined As:    unsigned short user_record;
  489.  
  490.        Description:   This variable holds the user record number.
  491.  
  492.        time_limit                         pcboard.sys
  493.        ------------------------------------------------------------------
  494.        Defined As:    short     time_limit;
  495.  
  496.        Description:   This variable holds the user BBS system time limit
  497.                       in minutes.
  498.  
  499.                                           COMPATIBILITY   Global Variables
  500.  
  501.        time_added                       pcboard.sys
  502.        ------------------------------------------------------------------
  503.        Defined As:    short     time_added;
  504.  
  505.        Description:   This variable holds the Area user time added so
  506.                       far in minutes.
  507.  
  508.        min_left                pcboard.sys door.sys wildcat! dorinfox.def
  509.        ------------------------------------------------------------------
  510.        Defined As:    short     min_left;
  511.  
  512.        Description:   This variable holds the user time left on system.
  513.  
  514.        port                         pcboard.sys door.sys wildcat!
  515.        ------------------------------------------------------------------
  516.        Defined As:    short     port;
  517.  
  518.        Description:   This variable holds the com port in use.
  519.                       Equal to 0 if local mode.
  520.  
  521.        node[]                  pcboard.sys door.sys wildcat! dorinfox.def
  522.        ------------------------------------------------------------------
  523.        Defined As:    char      node[3];    NOTE: N/A for PCBoard 12.0
  524.  
  525.        Description:   This string holds the node in use.
  526.                       Equal to space if no network active.
  527.  
  528.        *conferences                     door.sys        wildcat!
  529.        ------------------------------------------------------------------
  530.        Defined As:    char *conferences;
  531.  
  532.        Description:   This a pointer to a string of conferences/forums
  533.                       the user is registered in.
  534.  
  535.  
  536.        parity                           door.sys wildcat!
  537.        ------------------------------------------------------------------
  538.        Defined As:    short parity;
  539.  
  540.        Description:   Represent the ASCII character of parity in use.
  541.                       Note this NOT a string. It will either be ASCII
  542.                       7 (0x37) or 8 (0x38).
  543.  
  544.        protocol                     pcboard.sys door.sys wildcat!
  545.        ------------------------------------------------------------------
  546.        Defined As:    char protocol[15]
  547.  
  548.        Description:   String containing the users current protocol setting.
  549.                       PCBoard/GAP/SPITFIRE will only list the 1st char. of the
  550.                       protocol, WILDCAT! will give the entire protocol
  551.                       name.
  552.  
  553.        security_level                      door.sys wildcat! dorinfox.def
  554.        ------------------------------------------------------------------
  555.        Defined As:    char security_level[5]
  556.  
  557.        Description:   String containing the users security level.
  558.                       See also user.sec below
  559.  
  560.                                           COMPATIBILITY   Global Variables
  561.  
  562.        current_conference               door.sys
  563.        ------------------------------------------------------------------
  564.        Defined As:    short current_conference;
  565.  
  566.        Description:   Conference number user just exited from to door.
  567.  
  568.        caller_bday                      door.sys wildcat!
  569.        ------------------------------------------------------------------
  570.        Defined As:    char caller_bday[8];
  571.  
  572.        Description:   String containing the callers birthday.
  573.                       as MM/DD/YY.  Not available with PCBoard systems.
  574.  
  575.        main_dir                         door.sys
  576.        ------------------------------------------------------------------
  577.        Defined As:    char main_dir[15];
  578.  
  579.        Description:   String containing the path to the MAIN directory
  580.                       wherever the users file is located.
  581.  
  582.        gen_dir                          door.sys
  583.        ------------------------------------------------------------------
  584.        Defined As:    char gen_dir[15];
  585.  
  586.        Description:   String containing the path to the GEN directory.
  587.  
  588.        sysop_name                       door.sys dorinfox.def
  589.        ------------------------------------------------------------------
  590.        Defined As:    char sysop_name[15];
  591.  
  592.        Description:   String containing the sysop's first name.
  593.  
  594.        sysop_alias                      door.sys
  595.        ------------------------------------------------------------------
  596.        Defined As:    char sysop_alias[15];
  597.  
  598.        Description:   String containing the sysop's alias name.
  599.  
  600.  
  601.        ansi_NG                          door.sys
  602.        ------------------------------------------------------------------
  603.        Defined As:    short ansi_NG;
  604.  
  605.        Description:   ANSI supported and caller using NG mode.
  606.                       TRUE/FALSE   0 = No,  1 = yes.
  607.  
  608.        record_lock                      door.sys
  609.        ------------------------------------------------------------------
  610.        Defined As:    short record_lock;
  611.  
  612.        Description:   User record locking.
  613.                       TRUE/FALSE   0 = No,  1 = yes.
  614.  
  615.        default_color                    door.sys
  616.        ------------------------------------------------------------------
  617.        Defined As:    char default_color[2];
  618.  
  619.        Description:   String containing system's default color
  620.  
  621.                                           COMPATIBILITY   Global Variables
  622.  
  623.        last_file_scan                   door.sys wildcat!
  624.        ------------------------------------------------------------------
  625.        Defined As:    char last_file_scan[9];
  626.  
  627.        Description:   String containing user last new files scan as
  628.                       MM/DD/YY.
  629.  
  630.        daily_files                      door.sys wildcat!
  631.        ------------------------------------------------------------------
  632.        Defined As:    char daily_files[4];
  633.  
  634.        Description:   String containing number of files user has download
  635.                       so far today.
  636.  
  637.        daily_bytes                      door.sys wildcat!
  638.        ------------------------------------------------------------------
  639.        Defined As:    char daily_bytes[4];
  640.  
  641.        Description:   String containing number of K bytes user downloaded
  642.                       so far today.
  643.  
  644.        total_doors                      door.sys
  645.        ------------------------------------------------------------------
  646.        Defined As:    char total_doors[4];
  647.  
  648.        Description:   String containing number of doors user has opened.
  649.  
  650.        msgs_left                        door.sys
  651.        ------------------------------------------------------------------
  652.        Defined As:    char msgs_left[4];
  653.  
  654.        Description:   String containing total number of messages left by
  655.                       user.
  656.  
  657.        max_files                          door.sys
  658.        ------------------------------------------------------------------
  659.        Defined As:    char max_files[4];
  660.  
  661.        Description:   String containing Max. number of files allowed.
  662.  
  663.  
  664.        upload_Kbytes                      door.sys
  665.        ------------------------------------------------------------------
  666.        Defined As:    char upload_Kbyte[10];
  667.  
  668.        Description:   String containing total "K" bytes uploaded.
  669.  
  670.        download_Kbytes                      door.sys wildcat!
  671.        ------------------------------------------------------------------
  672.        Defined As:    char download_Kbyte[10];
  673.  
  674.        Description:   String containing total "K" bytes downloaded.
  675.  
  676.  
  677.        dload_total                           door.sys wildcat!
  678.        ------------------------------------------------------------------
  679.        Defined As:    char dload_total[5];
  680.  
  681.        Description:   String containing total files downloaded.
  682.  
  683.                                           COMPATIBILITY   Global Variables
  684.  
  685.        upload_total                         door.sys wildcat!
  686.        ------------------------------------------------------------------
  687.        Defined As:    char upload_total[5];
  688.  
  689.        Description:   String containing total files uploaded.
  690.  
  691.  
  692.        monitor_type                                  wildcat!
  693.        ------------------------------------------------------------------
  694.        Defined As:    char monitor_type[5];
  695.  
  696.        Description:   String containing monitor type MONO/COLOR
  697.                       NOTE: CKIT will set graphics true/false
  698.                       depending on this setting. see Graphics above.
  699.  
  700.        max_sec                                       wildcat!
  701.        ------------------------------------------------------------------
  702.        Defined As:    char max_sec[5];
  703.  
  704.        Description:   String containing a systems maximum user
  705.                       security level for WILDCAT! systems.
  706.  
  707.        high_msg                                      wildcat!
  708.        ------------------------------------------------------------------
  709.        Defined As:    char high_msg[10]'
  710.  
  711.        Description:   String containing the users highest message
  712.                       read.
  713.  
  714.        name_in_use                                   wildcat!
  715.        ------------------------------------------------------------------
  716.        Defined As:    BYTE name_in_use
  717.  
  718.        Description:   Set to TRUE/FALSE. This is called already_connected
  719.                        in the WILDCAT def. file.
  720.  
  721.        door_opened                                   wildcat!
  722.        ------------------------------------------------------------------
  723.        Defined As:    short door_opened
  724.  
  725.        Description:   Which door was opened to run your door.
  726.  
  727.        BBSname                                       dorinfox.def
  728.        ------------------------------------------------------------------
  729.        Defined As:    char BBSname[63];
  730.  
  731.        Description:   Name of the BBS system running the door.
  732.  
  733.                                                           Global Variables
  734.  
  735.         These are part of the structure "user" as defined in the CKIT.H file.
  736.         All these user structure members are available only if the door author
  737.         specifies USERFILES True (see above) and the system is PCBoard version
  738.         14.x.  Some but not all members are available if the author specifies
  739.         USERFILE True and used with Pcboard version 12.0.  If the door author
  740.         does not specify USERFILE's file True and the door is using  DOOR.SYS
  741.         or CALLINFO.BBS some members of the structure are also available.
  742.         Each member is marked whether if it is available with door.sys
  743.         and/or PCBoard version 12.0.  Also see update_user() below.
  744.  
  745.        user.name           See also fullname        PCBoard 12.0
  746.        ------------------------------------------------------------------
  747.        Defined As:    char    user.name[26];
  748.  
  749.        Description:   This C string is an ASCII string of the
  750.                       caller fullname as determined from user record.
  751.  
  752.        user.city              door.sys PCBoard 12.0 Wildcat! dorinfox.def
  753.        ------------------------------------------------------------------
  754.        Defined As:    char    user.city[25];
  755.  
  756.        Description:   This C string is an ASCII string of the
  757.                       caller city, state as determined from user record.
  758.  
  759.        user.pwrd                        door.sys and PCBoard
  760.        ------------------------------------------------------------------
  761.        Defined As:    char    user.pwrd[13];
  762.  
  763.        Description:   This C string is an ASCII string of the
  764.                       caller password as determined from user record.
  765.  
  766.        user.bphone                      door.sys and PCBoard 12.0
  767.        ------------------------------------------------------------------
  768.        Defined As:    char    user.bphone[14];
  769.  
  770.        Description:   This C string is an ASCII string of the caller
  771.                       business phone number as determined from user record.
  772.  
  773.        user.phone                door.sys and PCBoard 12.0 Wildcat!
  774.        ------------------------------------------------------------------
  775.        Defined As:    char    user.phone[14];
  776.  
  777.        Description:   This C string is an ASCII string of the caller
  778.                       home phone number as determined from user record.
  779.  
  780.        user.last_date                   door.sys and PCBoard 12.0
  781.        ------------------------------------------------------------------
  782.        Defined As:    char    user.last_date[7];
  783.  
  784.        Description:   This C string is an ASCII string of the caller
  785.                       last date on system as determined from user record.
  786.                       Format is YYMMDD
  787.  
  788.        user.last_time                   door.sys and PCBoard 12.0
  789.        ------------------------------------------------------------------
  790.        Defined As:    char    user.last_time[6];
  791.  
  792.        Description:   This C string is an ASCII string of the caller
  793.                       last time on system as determined from user record.
  794.                       Format is HH:MM
  795.  
  796.  
  797.                                                           Global Variables
  798.  
  799.         These are part of the structure "user" as defined in the
  800.         CKIT.H file.  Information available from user file.
  801.  
  802.        user.expert            See also expert above    PCBoard 12.0
  803.        ------------------------------------------------------------------
  804.        Defined As:    char    user.expert[2];
  805.  
  806.        Description:   This C string is an ASCII string of the caller
  807.                       expert mode ( Y or N )
  808.  
  809.        user.protocol                     door.sys and PCBoard 12.0
  810.        ------------------------------------------------------------------
  811.        Defined As:    char    user.protocol[2];
  812.  
  813.        Description:   This C string is an ASCII string of the caller
  814.                       protocol type in effect.
  815.  
  816.        user.filedate                     see also _last_file_scan
  817.        ------------------------------------------------------------------
  818.        Defined As:    char    user.filedate[7];
  819.  
  820.        Description:   This C string is an ASCII string of the caller
  821.                       last DIR scan. in YYMMDD format
  822.  
  823.        user.security                               door.sys dorinfox.def
  824.        ------------------------------------------------------------------
  825.        Defined As:    BYTE   user.security;
  826.  
  827.        Description:   This variable holds the user security level as
  828.                        determined from USER file.
  829.  
  830.        user.total_calls
  831.        ------------------------------------------------------------------
  832.        Defined As:    short     user.total_calls;
  833.  
  834.        Description:   This variable holds the user total calls on system
  835.                        determined from USER file.
  836.  
  837.        user.page_length        see also page_length    door.sys
  838.        ------------------------------------------------------------------
  839.        Defined As:    BYTE      user.page_length;
  840.  
  841.        Description:   This variable holds the user page setting as
  842.                       determined from USER file.
  843.  
  844.        user.uploads             see also upload_total
  845.        ------------------------------------------------------------------
  846.        Defined As:    long      user.uploads;
  847.  
  848.        Description:   This variable holds the user total uploads as
  849.                       determined from USER file.
  850.  
  851.        user.dloads               see also dload_total
  852.        ------------------------------------------------------------------
  853.        Defined As:    long      user.dloads;
  854.  
  855.        Description:   This variable holds the user total downloads as
  856.                       determined from USER file.
  857.  
  858.  
  859.                                                           Global Variables
  860.  
  861.         These are part of the structure "user" as defined in the
  862.         CKIT.H file.  Information available from user file.
  863.  
  864.        user.comment1                            door.sys
  865.        ------------------------------------------------------------------
  866.        Defined As:    char    user.comment1[31];
  867.  
  868.        Description:   This C string is an ASCII string of the caller
  869.                       user maintained comment.
  870.  
  871.        user.comment2
  872.        ------------------------------------------------------------------
  873.        Defined As:    char    user.comment2[32];
  874.  
  875.        Description:   This C string is an ASCII string of the caller
  876.                       sysop maintained comment.
  877.  
  878.        user.expire_date                         door.sys
  879.        ------------------------------------------------------------------
  880.        Defined As:    char    user.expire_date[7];
  881.  
  882.        Description:   This C string is an ASCII string of the caller
  883.                       expiration date in YYMMDD format.
  884.  
  885.        user.delete_user
  886.        ------------------------------------------------------------------
  887.        Defined As:    char    user.delete_user[2];
  888.  
  889.        Description:   This C string is an ASCII string of delete
  890.                       user flag. (Y or N)
  891.  
  892.        user.time_used
  893.        ------------------------------------------------------------------
  894.        Defined As:    short   user.time_used;
  895.  
  896.        Description:   Elapsed time on system. (minutes)
  897.  
  898.  
  899.                                                   System  Global Variables
  900.  
  901.         These variables are available with any system.  Some are used
  902.         for custiomization of your door program and MUST be defined.
  903.         Others using are meant to be read only variables available globally.
  904.         Some are are used in conjuction with high level functions as noted.
  905.  
  906.        char     progname[]          pcboard.sys door.sys wildcat! generic
  907.        ------------------------------------------------------------------
  908.        Defined as:    char   prognam[21];
  909.  
  910.        Description:   Set this to your Door program name.  It will be
  911.                       display on the status line on the sysop screen.
  912.                       MAXIMUM length is 20 characters! Do not exceed this!
  913.  
  914.        NOTE: THIS IS NOT AN OPTION. You must define progname[] even if
  915.              you do not plan on using it.
  916.  
  917.        cmdline[]                    pcboard.sys door.sys wildcat! generic
  918.        ------------------------------------------------------------------
  919.        Defined as:    BYTE    cmdline[128]
  920.  
  921.        Description:   This is used by get_cmdline(), to read the user
  922.                       keyboard input to.
  923.                       Please see the CKITDEMO.C for usage.
  924.  
  925.        See Also:      get_cmdline();
  926.  
  927.        par[]                        pcboard.sys door.sys wildcat! generic
  928.        ------------------------------------------------------------------
  929.        Defined as:    char    par[128];
  930.  
  931.        Description:   This is used by get_nextpar(), to parse stacked
  932.                       commands to.
  933.                       Please see CKITDEMO.C for usage.
  934.  
  935.        See Also:      get_cmdline(), get_nextpar();
  936.  
  937.        scan_code                    pcboard.sys door.sys wildcat! generic
  938.        ------------------------------------------------------------------
  939.        Defined as:    size_t  scan_code;
  940.  
  941.        Description:   This variable will if NONZERO  contain the key_code
  942.                       of any NON-STANDARD keys on the IBM keyboard.
  943.                       (F1-F10, PgDn, PgUp etc).  The remote user must be
  944.                       in some type of terminal program that will allow
  945.                       passing the keycodes.  Qmodem in "DOORWAY" mode
  946.                       is one example.
  947.                       Please see input(), get_cmdline() and ckitdemo.c
  948.                       for examples.
  949.  
  950.        See Also:      get_cmdline();
  951.  
  952.         key_source                   pcboard.sys door.sys wildcat! generic
  953.        ------------------------------------------------------------------
  954.        Defined as:    short   key_source;
  955.  
  956.        Description:   This variable will a 1 if the input from get_cmdline()
  957.                       came from the LOCAL console or a 2 if it came from
  958.                       a REMOTE console.
  959.  
  960.        See Also:      get_cmdline(), input()
  961.  
  962.  
  963.                                                  System  Global Variables
  964.  
  965.        system_time_HHMMSS[]         pcboard.sys door.sys wildcat! generic
  966.        ------------------------------------------------------------------
  967.        Defined as:    char    system_time_HHMMSS[9];
  968.  
  969.        Description:   This string will contain the current system time
  970.                       in the form HH:MM:SS and is available for general use.
  971.  
  972.  
  973.        system_date_MMDDYY[]         pcboard.sys door.sys wildcat! generic
  974.        ------------------------------------------------------------------
  975.        Defined as:    char    todays_date_MMDDYY[9];
  976.  
  977.        Description:   This string will contain the current system date
  978.                       in the form MM:DD:YY and is available for general use.
  979.  
  980.  
  981.        error_msg11[]                pcboard.sys door.sys wildcat! generic
  982.        ------------------------------------------------------------------
  983.        Defined as:    char    error_msg11[40];
  984.  
  985.        Description:   Error message used by display_file.  If you do not
  986.                       define this, CKIT will default to it's standard
  987.                       error message.  MAX. 40 chars. (not including NULL).
  988.  
  989.        chatmode                     pcboard.sys door.sys wildcat! generic
  990.        ------------------------------------------------------------------
  991.        Defined as:    short   chatmode;
  992.  
  993.        Description:   This variable will a 1 (TRUE) if chat mode has been
  994.                       active.  Use this to re-fresh your screen if needed.
  995.                       It is YOUR responsiblity to de-assert the variable
  996.                       after you have used it.  (set to FALSE)
  997.  
  998.  
  999.  
  1000.                                                        Standard Data Types
  1001.  
  1002.                                Standard Data Types
  1003.  
  1004.        CKIT defines a number of useful data types.
  1005.  
  1006.        BYTE
  1007.        -------------------------------------------------------------------
  1008.        Defined As:    typedef unsigned char  BYTE;
  1009.  
  1010.        Description:   The  BYTE data type is useful in serial communications
  1011.                       since it provides an easier and more logical way of
  1012.                       handling 8 bit data from UART's used in serial
  1013.                       communications.
  1014.  
  1015.  
  1016.  
  1017.  
  1018.                                                                  Functions
  1019.  
  1020.                                     Functions
  1021.  
  1022.        The  CKIT Library contains a variety  of functions.
  1023.        They are described as follows:
  1024.  
  1025.        Summary:       Presents  an exact syntactic  model for each  of the
  1026.                       CKIT Library functions.
  1027.  
  1028.        Description:   Describes a function's purpose and how it is used in
  1029.                       an application program.
  1030.  
  1031.        Return Value:  Explains  any of the  possible return values  for a
  1032.                       CKIT Library function.
  1033.  
  1034.        See Also:      Lists any similar or related CKIT Library  function.
  1035.  
  1036.        Example:       Illustrates how  a  CKIT Library  function could
  1037.                       actually be used in an application program.
  1038.                       Most function listed in the examples will be simply
  1039.                       listed as function().  This may not indicate how
  1040.                       they are called.  To see how they are prototyped and
  1041.                       called go to that function's page.
  1042.                       I.E. If open_door is used in an example (other than
  1043.                       it's own example) it may be simply refered to as
  1044.                       open_door().
  1045.                       In reality open_door is really open_door(char * ...);
  1046.  
  1047.        The library functions are classified as 3 different types.
  1048.        High level, intermediate and low level.   Normally a door would
  1049.        not need to make use of any of the functions except the high
  1050.        level functions.  These handle and watch all the system
  1051.        timeouts, carrier detects, keyboard timeouts etc.
  1052.        If you need more control, there are other functions available.
  1053.        I will warn you.  The lower level function you use, the less
  1054.        it will check for you automatically.  Do not use these unless
  1055.        you have to.
  1056.  
  1057.                                                                  Functions
  1058.        open_door
  1059.        -------------------------------------------------------------------
  1060.        Summary:       #include "ckit.h"
  1061.                       void open_door();
  1062.  
  1063.        Description:   The open door function initializes vectors, reads bbs
  1064.                       system information.    THIS MUST BE CALLED FIRST!
  1065.                       The fist pointer should be be the path/name to the system
  1066.                       file. The second pointer should be the path/name to the
  1067.                       users file, if you designated USERSFILE=TRUE.
  1068.                       (for pcboard systems only).  As long as you have defined
  1069.                       USERSFILE = FALSE, CKIT will not attempt to use the second
  1070.                       pointer. Which ever you specify, the PORT:AAAA:A (if used)
  1071.                       must be the last parameter passed to open_door();.
  1072.                       Close_door MUST be called before exiting program  after a
  1073.                       call to open_door. See the CKITDEMO.C for more examples.
  1074.        Return Value:  No value is returned.
  1075.  
  1076.        See Also:      close_door. USERSFILE
  1077.  
  1078.        Example:  This example assumes the path\filenames passed on the command
  1079.                   line.  i.e  program_name path\filename path\filename port
  1080.                       #include "ckit.h"
  1081.                       main(int argc, char **argv) {
  1082.                         if (argc > 0) {
  1083.                           open_door(argv[1], argv[2], argv[3]);  <--- NOTE:
  1084.                           display_info();                         argv[2] and
  1085.                           your_main_program();                    argv[3] are
  1086.                           close_door();                           optional.
  1087.                           exit(0);                                see below.
  1088.                         }
  1089.                       }
  1090. NOTE: Both PORT and USERSFILE are optional. If a user needed to specify a non-standard
  1091. port address and IRQ, then the syntax is PORT:AAAA:A where AAAA is the base address and
  1092. A is the IRQ. It doesn't matter whether PORT:AAAA:A is the second or third parameter
  1093. (depending on if you were opening the user file) passed to open_door() as long as it is
  1094. the LAST parameter passed.  Note also it does not matter which order on the cmd line the
  1095. arguments are listed. The only thing that matters is which order they are passed to the
  1096. open_door() function itself.  You could also have the system path as part of
  1097. a config file for your door.  Then you would read your config file and pass
  1098. the path read from it to open_door() as a string ptr.
  1099.  
  1100. EXAMPLES: Assume door.cfg below is a config file that your door programs reads.
  1101. This all depends on how or what is desired for your door program.  You would
  1102. need to document in your door documentation in what order the cmd line should be
  1103. for your door program, read your config file and pass the system name\path
  1104. to open_door().
  1105. Your program's cmd line: progname PORT:02F8:3 door.cfg
  1106. open_door() call       : open_door(system_path); <-string read from config file
  1107.  
  1108. Your program's cmd line: program_name c:\pcb\pcboard.sys PORT:03F8:4
  1109. open_door()  call      : open_door(argv[1], argv[2]);
  1110.  
  1111. Your program's cmd line: program_name \pcboard.sys  PORT:03F8:4 \main\users
  1112. open_door()  call      : open_door(argv[1], argv[3], arg[2]);
  1113.  
  1114. Your program's cmd line: program_name c:\pcb\door.sys
  1115. open_door()  call      : open_door(argv[1]);
  1116.  
  1117. Your program's cmd line: program_name c:\wc\callinfo.bbs PORT:02F8:3
  1118. open_door()  call      : open_door(argv[1], argv[2]);
  1119.  
  1120. Your program's cmd line: program_name c:\rbbs\dorinfo1.def
  1121. open_door()  call      : open_door(argv[1]);
  1122.  
  1123.  
  1124.                                                                  Functions
  1125.  
  1126.        close_door                                high level
  1127.        -------------------------------------------------------------------
  1128.        Summary:       #include "ckit.h"
  1129.                       void close_door(void);
  1130.  
  1131.        Description:   The close door function resets vectors,
  1132.                       closes files opened.
  1133.                       THIS MUST BE CALLED LAST!
  1134.                       Close_door MUST be called before exiting program
  1135.                       after a call has been made to open_door.
  1136.                       Not doing so will certainly lock you up.
  1137.  
  1138.        Return Value:  No value is returned.
  1139.  
  1140.        See Also:      open_door.
  1141.  
  1142.        Example:
  1143.                       #include "ckit.h"
  1144.                       main(int argc, char **argv) {
  1145.                         if (argc > 0) {
  1146.                           open_door(argv[1]); /* pass system file(s) */
  1147.                           .
  1148.                           .
  1149.                           .
  1150.                           . your door program
  1151.                           .
  1152.                           .
  1153.                           close_door();
  1154.                         };
  1155.                       };
  1156.  
  1157.  
  1158.                                                                  Functions
  1159.  
  1160.        update_user      PCBOARD 14.5 only        high level
  1161.        -------------------------------------------------------------------
  1162.        Summary:       #include "ckit.h"
  1163.                       void update_user();
  1164.  
  1165.        Description:   The update_user will accept a POINTER to the
  1166.                       user structure member to update.  See the
  1167.                       user structure above.  This function will only
  1168.                       work for PCBoard 14.5 and USERSFILE must be set
  1169.                       TRUE.  CKIT will update the user file when the
  1170.                       door is closed.  If you do not want CKIT to update
  1171.                       the user record after a change has been made
  1172.                       set USERSFILE = FALSE before calling close_door();
  1173.  
  1174.        Return Value:  No value is returned.
  1175.  
  1176.        See Also:      user structure
  1177.  
  1178.        Example: Change user security and comment1 field.
  1179.                 MOTICE THE & BELOW!.  You MUST pass the address of the
  1180.                 member to update in the user structure.
  1181.  
  1182.                       #include "ckit.h"
  1183.                       main(int argc, char **argv) {
  1184.                       USERSFILE = TRUE;
  1185.                       static char new_comment[] = "ckit_user";
  1186.                       if (argc > 0) {
  1187.                           open_door(argv[1]); /* pass system file(s) */
  1188.                           .
  1189.                           .
  1190.                           .
  1191.                           user.security = 50;
  1192.                           update_user(&user.security);
  1193.                           strcpy(user.comment1, new_comment);
  1194.                           update_user(&user.comment1);
  1195.                           .
  1196.                           .
  1197.                           .
  1198.                           close_door();
  1199.                         };
  1200.                       };
  1201.  
  1202.                                                                  Functions
  1203.  
  1204.        s_puts                                    high level
  1205.        -------------------------------------------------------------------
  1206.        Summary:       #include "ckit.h"
  1207.                       void s_puts(char *);
  1208.  
  1209.        Description:   The s_puts function displays a single NULL termintated
  1210.                       (C string) to the local and remote console. It expects
  1211.                       a pointer to the string of type BYTE or char
  1212.                       to be displayed.  It will not handle ANSI.  See
  1213.                       s_putstd() for ANSI and other usage.
  1214.  
  1215.        Return Value:  No value is returned.
  1216.  
  1217.        See Also:      s_printf, s_putv, s_putc, s_putsn, s_putstd
  1218.  
  1219.        Example:       Two examples, both different useage of the string pointer.
  1220.                       #include "ckit.h"
  1221.                       static BYTE string[] = "This is a test";
  1222.                       main(int argc, char **argv) {
  1223.                         if (argc > 0) {
  1224.                           open_door(argv[1]); /* pass system file(s) */
  1225.                           .
  1226.                           .
  1227.                           .
  1228.                           s_puts(string);
  1229.                           s_puts("This is also a test");
  1230.                           .
  1231.                           .
  1232.                           .
  1233.                           close_door();
  1234.                         };
  1235.                       };
  1236.  
  1237.  
  1238.                                                                 Functions
  1239.  
  1240.        s_putstd                                  high level
  1241.        -------------------------------------------------------------------
  1242.        Summary:       #include "ckit.h"
  1243.                       void s_putstd(char *);
  1244.  
  1245.        Description:   The s_putstd function displays a single NULL termintated
  1246.                       (C string) to the local and remote console. It expects
  1247.                       a pointer to the string of type BYTE or char
  1248.                       to be displayed. This function is identical to s_puts
  1249.                       except it uses std output.
  1250.                       This function should be used when ANSI code, or CTRL
  1251.                       chars are needed to be sent to the local and remote
  1252.                       consoles.
  1253.  
  1254.        Return Value:  No value is returned.
  1255.  
  1256.        See Also:      s_printf, s_putv, s_putc, s_putsn
  1257.  
  1258.        Example:       Use s_putstd() to change background/foreground colors
  1259.                       #include "ckit.h"
  1260.  
  1261.                       #define cyanblue        0
  1262.                       #define yellowbrown     1
  1263.                       #define redgreen        2
  1264.                       #define redcyan         3
  1265.                       #define cyanred         4
  1266.                       #define cyanmagenta     5
  1267.                       #define bluegrey        6
  1268.  
  1269.                       static char *ansi_color[8]  = {
  1270.                          "\33[0;1;36;44mCyan on Blue\33[40m"
  1271.                          "\33[44m\33[33;43mYellow on Brown\33[40m"
  1272.                          "\33[43m\33[0;31;42mRed on Green\33[40m"
  1273.                          "\33[42m\33[46mRed on Cyan\33[40m"
  1274.                          "\33[46m\33[1;36;41mCyan on Red\33[40m"
  1275.                          "\33[41m\33[45mCyan on Magenta\33[40m"
  1276.                          "\33[45m\33[0;34;47mBlue on Grey\33[0m"
  1277.                       };
  1278.  
  1279.                       main(int argc, char **argv) {
  1280.                         if (argc > 0) {
  1281.                           open_door(argv[1]); /* pass system file(s) */
  1282.                           .
  1283.                           .
  1284.                           .
  1285.                           s_putstd(ansi_color[cyanblue]);
  1286.                           s_putstd(ansi_color[yellowbrown]);
  1287.                           s_putstd(ansi_color[redgreen]);
  1288.                           s_putstd(ansi_color[redcyan]);
  1289.                           s_putstd(ansi_color[cyanred]);
  1290.                           s_putstd(ansi_color[cyanmagenta]);
  1291.                           s_putstd(ansi_color[bluegrey]);
  1292.                           .
  1293.                           .
  1294.                           .
  1295.                           close_door();
  1296.                         };
  1297.                       };
  1298.  
  1299.  
  1300.                                                                  Functions
  1301.  
  1302.        s_putv                                    high level
  1303.        -------------------------------------------------------------------
  1304.        Summary:       #include "ckit.h"
  1305.                       void s_putv();
  1306.  
  1307.        Description:   The s_putv function displays a single NULL terminated
  1308.                       (C string) to the local and remote console. It expects
  1309.                       a variable argument of pointer(s) to the string(s)
  1310.                       of type BYTE or char to be displayed.  The list of
  1311.                       pointers MUST end with a NULL pointer!.  Not doing
  1312.                       so will most likely either cause garbage to printed
  1313.                       or even a hang-up.
  1314.  
  1315.        Return Value:  No value is returned.
  1316.  
  1317.        See Also:      s_printf, s_puts, s_putc, s_putsn
  1318.  
  1319.        Example:       This example prints 2 strings with the pointer list
  1320.                       terminated with a NULL pointer.
  1321.                       #include "ckit.h"
  1322.                       static BYTE string[] = "This is a test";
  1323.                       main(int argc, char **argv) {
  1324.                         if (argc > 0) {
  1325.                           open_door(argv[1]); /* pass system file(s) */
  1326.                           .
  1327.                           .
  1328.                           .
  1329.                           static BYTE string[] = "This is a test";
  1330.                           s_putv(string, "This is also a test", NULL);
  1331.                           .
  1332.                           .
  1333.                           .
  1334.                           close_door();
  1335.                         };
  1336.                       };
  1337.  
  1338. NOTE: an alternative to using s_putv would be to include the function
  1339.       below in your source code.  You could use this function the same
  1340.       as you would printf();  This function has already been protyped
  1341.       in CKIT.H
  1342.  
  1343.  
  1344.                                                                  Functions
  1345.        s_printf                                  high level
  1346.        -------------------------------------------------------------------
  1347.        Summary:       #include "ckit.h"
  1348.                       void    s_printf(char *,...);
  1349.  
  1350.        Description:   The s_printf function is used to format an output
  1351.                       to be sent to the local and remote console. It is
  1352.                       exactly the same as the printf() function in C.
  1353.                       To use it, you must include the source code listed
  1354.                       below in your door program since s_printf() is NOT an
  1355.                       actual part of the CKIT librarys.
  1356.                       NOTE: if you want to send ANSI strings, change the
  1357.                       s_puts in the s_printf function to s_putstd or create
  1358.                       another std_printf function using s_putstd as the
  1359.                       output.
  1360.  
  1361.        Return Value:  No value is returned.
  1362.  
  1363.        See Also:      s_printf, s_puts, s_putv
  1364.  
  1365. INCLUDE THIS SOURCE CODE IN YOUR DOOR PROGRAM TO USE S_PRINTF!
  1366. THE FUNCTION HAS ALREADY BEEN PROTOTYPED IN CKIT.H
  1367. MODIFY AS YOU WANT.
  1368. /****************************************************************************
  1369.  *      Printf() function for sending output to port                        *
  1370.  ****************************************************************************/
  1371. void s_printf(char *s_format,...) {
  1372.     va_list arg_pointer;
  1373.     char buffer[82];                    /* default of 82 chars */
  1374.     va_start(arg_pointer, s_format);
  1375.     vsprintf(buffer, s_format, arg_pointer);
  1376.     s_puts(buffer);
  1377.     va_end(arg_pointer);
  1378. }
  1379.  
  1380.        Example:
  1381. /****************************************************************************
  1382.  *      sending a string out the port using s_printf()                      *
  1383.  ****************************************************************************/
  1384.               #include "ckit.h"
  1385.               short  number  34;
  1386.               main(int argc, char **argv) {
  1387.                 if (argc > 0) {
  1388.                   open_door(argv[1]); /* pass system file(s) */
  1389.                   .
  1390.                   .
  1391.                   .
  1392.                   s_printf("Hello, %s. The number is %d.", firstname, number);
  1393.                   .
  1394.                   .
  1395.                   .
  1396.                   close_door();
  1397.                 };
  1398.               };
  1399.  
  1400.  
  1401.                                                                  Functions
  1402.  
  1403.        s_putsn                                   high level
  1404.        -------------------------------------------------------------------
  1405.        Summary:       #include "ckit.h"
  1406.                       void s_putsn(char *);
  1407.  
  1408.        Description:   The s_putsn function displays a single NULL terminated
  1409.                       (C string) to the local console only.       It expects
  1410.                       a pointer to the string of type BYTE or char
  1411.                       to be displayed.
  1412.  
  1413.        Return Value:  No value is returned.
  1414.  
  1415.        See Also:      s_printf, s_putv, s_putc, s_putstd
  1416.  
  1417.        Example:       Two examples, both different useage of the string pointer.
  1418.                       #include "ckit.h"
  1419.                       static BYTE string[] = "This is a test";
  1420.                       main(int argc, char **argv) {
  1421.                         if (argc > 0) {
  1422.                           open_door(argv[1]); /* pass system file(s) */
  1423.                           .
  1424.                           .
  1425.                           .
  1426.                           static BYTE string[] = "This is a test";
  1427.                           s_putsn(string);
  1428.                           s_putsn("This is also a test");
  1429.                           .
  1430.                           .
  1431.                           .
  1432.                           close_door();
  1433.                         };
  1434.                       };
  1435.  
  1436.  
  1437.                                                                  Functions
  1438.  
  1439.        s_putc                                   high level
  1440.        -------------------------------------------------------------------
  1441.        Summary:       #include "ckit.h"
  1442.                       void s_putc(BYTE);
  1443.  
  1444.        Description:   The s_putc function displays a single BYTE or char
  1445.                       to the local and remote console.
  1446.  
  1447.        Return Value:  No value is returned.
  1448.  
  1449.        See Also:      s_printf, s_puts, s_putc.
  1450.  
  1451.        Example:       This example prints a single BYTE (ASCII A) to local
  1452.                       and remote console.
  1453.                       #include "ckit.h"
  1454.                       BYTE byte_to_send = 0x41;
  1455.                       main(int argc, char **argv) {
  1456.                           if (argc > 0) {
  1457.                           open_door(argv[1]); /* pass system file(s) */
  1458.                           s_putc(byte_to_send);
  1459.                           close_door();
  1460.                           };
  1461.                       };
  1462.  
  1463.                                                                  Functions
  1464.  
  1465.        newline                                  high level
  1466.        -------------------------------------------------------------------
  1467.        Summary:       #include "ckit.h"
  1468.                       void newline(void);
  1469.  
  1470.        Description:   The newline function sends a Carriage Return/
  1471.                       Line Feed to the local and remote console.
  1472.  
  1473.        Return Value:  No value is returned.
  1474.  
  1475.        See Also:      s_printf, s_puts, s_putc.
  1476.  
  1477.        Example:       This example prints single CR/LF to local
  1478.                       and remote console.
  1479.                       #include "ckit.h"
  1480.                       main(int argc, char **argv) {
  1481.                         if (argc > 0) {
  1482.                           open_door(argv[1]); /* pass system file(s) */
  1483.                           .
  1484.                           .
  1485.                           .
  1486.                           newline();
  1487.                           .
  1488.                           .
  1489.                           .
  1490.                           close_door();
  1491.                         };
  1492.                       };
  1493.  
  1494.  
  1495.                                                                  Functions
  1496.  
  1497.        clear_row                                high level
  1498.        -------------------------------------------------------------------
  1499.        Summary:       #include "ckit.h"
  1500.                       void clear_row(short);
  1501.  
  1502.        Description:   The clear_row function clears a given row on screen
  1503.                       of the local and remote console. (row = 1 - 24).
  1504.                       Used only if caller is in GRAPHICS mode. (ANSI)
  1505.  
  1506.        Return Value:  No value is returned.
  1507.  
  1508.        See Also:      clear_eol, clr_screen.
  1509.  
  1510.        Example:       This example prints a string on a line, then
  1511.                       erases the string.
  1512.  
  1513.                       #include ckit.h
  1514.  
  1515.                       char prompt1 = "Enter filename to view: ";
  1516.  
  1517.                       main(int argc, char **argv) {
  1518.                         if (argc > 0) {
  1519.                           open_door(argv[1]); /* pass system file(s) */
  1520.                           pos_cursor(10, 1);
  1521.                           s_puts(prompt1);
  1522.                           pos_cursor(11, 1);
  1523.                           s_puts("Ready to clear above row, press a key");
  1524.                           while(!(wait_keypress())) {
  1525.                         };
  1526.                         clear_row(10);  /* clear row 10 */
  1527.                         newline();
  1528.                         close_door();
  1529.                       };
  1530.  
  1531.  
  1532.                                                                  Functions
  1533.  
  1534.        clear_eol                                high level
  1535.        -------------------------------------------------------------------
  1536.        Summary:       #include "ckit.h"
  1537.                       void clear_eol(void);
  1538.  
  1539.        Description:   The clear_eol function clears to the end of line
  1540.                       from current cursor position.
  1541.                       Used only if caller is in GRAPHICS mode. (ANSI)
  1542.  
  1543.        Return Value:  No value is returned.
  1544.  
  1545.        See Also:      clear_eol, clr_screen.
  1546.  
  1547.        Example:       This example clears to end of line on screen of
  1548.                       local and remote console.
  1549.                       #include ckit.h
  1550.  
  1551.                       char prompt1 = "Enter filename to view: ";
  1552.  
  1553.                       main(int argc, char **argv) {
  1554.                         if (argc > 0) {
  1555.                           open_door(argv[1]);
  1556.                           newline();
  1557.                           s_puts("Press a key to clear end of line below");
  1558.                           newline();
  1559.                           s_putv(prompt1, "\r", NULL);
  1560.                           while(!(wait_keypress())) {
  1561.                           };
  1562.                           clear_eol();
  1563.                           newline();
  1564.                           close_door();
  1565.                         };
  1566.                       };
  1567.  
  1568.  
  1569.                                                                  Functions
  1570.  
  1571.        clr_screen                                high level
  1572.        -------------------------------------------------------------------
  1573.        Summary:       #include "ckit.h"
  1574.                       void clr_screen(void);
  1575.  
  1576.        Description:   The clr_screen function clears entire screen of local
  1577.                        and remote console in either ASCII or ANSI mode.
  1578.  
  1579.        Return Value:  No value is returned.
  1580.  
  1581.        See Also:      clear_screen.
  1582.  
  1583.        Example:       This example clears screen of local/remote console.
  1584.  
  1585.                       #include ckit.h
  1586.  
  1587.                       main(int argc, char **argv) {
  1588.                         if (argc > 0) {
  1589.                           open_door(argv[1]);
  1590.                           .
  1591.                           .
  1592.                           .
  1593.                           clr_screen();
  1594.                           .
  1595.                           .
  1596.                           .
  1597.                           close_door();
  1598.                         };
  1599.                       };
  1600.  
  1601.                                                                  Functions
  1602.  
  1603.        clear_screen                              high level
  1604.        -------------------------------------------------------------------
  1605.        Summary:       #include "ckit.h"
  1606.                       void clear_screen(void);
  1607.  
  1608.        Description:   The clear_screen function clears entire screen of
  1609.                       local console including status line.
  1610.  
  1611.        Return Value:  No value is returned.
  1612.  
  1613.        See Also:      clr_screen.
  1614.  
  1615.        Example:       This example clears screen of local console.
  1616.                       #include ckit.h
  1617.  
  1618.                       main(int argc, char **argv) {
  1619.                         if (argc > 0) {
  1620.                           open_door(argv[1]);
  1621.                           .
  1622.                           .
  1623.                           .
  1624.                           clear_screen();
  1625.                           .
  1626.                           .
  1627.                           .
  1628.                           close_door();
  1629.                         };
  1630.                       };
  1631.  
  1632.  
  1633.                                                                  Functions
  1634.  
  1635.        pos_cursor                                high level
  1636.        -------------------------------------------------------------------
  1637.        Summary:       #include "ckit.h"
  1638.                       void pos_cursor(short, short);
  1639.  
  1640.        Description:   The pos_cursor function positions cursor at
  1641.                       row, column using ANSI (caller must be in GRAPHICS,
  1642.                       if not no action will take place)
  1643.                       row = 1 to 25, column = 1 to 80.  CKIT will not
  1644.                       let the local screen position cursor in status
  1645.                       line area.
  1646.  
  1647.        Return Value:  No value is returned.
  1648.  
  1649.        Example:       This example positions cursor at row 10, column 15
  1650.                       on the local/remote consoles.
  1651.                       #include "ckit.h"
  1652.  
  1653.                       short     row = 10;
  1654.                       short     column = 15;
  1655.  
  1656.                       main(int argc, char **argv) {
  1657.                         if (argc > 0) {
  1658.                           open_door(argv[1]);
  1659.                           .
  1660.                           .
  1661.                           .
  1662.                           pos_cursor(row, column);
  1663.                           .
  1664.                           .
  1665.                           .
  1666.                           close_door();
  1667.                         };
  1668.                       };
  1669.  
  1670.                                                                  Functions
  1671.  
  1672.        set_r_c                                   high level
  1673.        -------------------------------------------------------------------
  1674.        Summary:       #include "ckit.h"
  1675.                       void set_r_c(short, short);
  1676.  
  1677.        Description:   The set_r_c function positions cursor at
  1678.                       row, column BIOS on the local screen.
  1679.                       row = 1 to 25, column = 1 to 80.
  1680.                       Ckit will not let the cursor be placed in the
  1681.                       status line area of local screen.
  1682.  
  1683.        Return Value:  No value is returned.
  1684.  
  1685.        Example:       This example positions cursor at row 5, column 1
  1686.                       on the local/remote consoles.
  1687.                       #include "ckit.h"
  1688.  
  1689.                       short     row = 5;
  1690.                       short     column = 1;
  1691.  
  1692.                       main(int argc, char **argv) {
  1693.                         if (argc > 0) {
  1694.                           open_door(argv[1]);
  1695.                           .
  1696.                           .
  1697.                           .
  1698.                           set_r_c(row, column);
  1699.                           .
  1700.                           .
  1701.                           .
  1702.                           close_door();
  1703.                         };
  1704.                       };
  1705.  
  1706.                                                                  Functions
  1707.  
  1708.        back_space                                high level
  1709.        -------------------------------------------------------------------
  1710.        Summary:       #include "ckit.h"
  1711.                       void back_space(short);
  1712.  
  1713.        Description:   The back_space function backspaces cursor short number
  1714.                       of spaces or to the 1st char in row, whichever is 1st.
  1715.                       This is a destrutive backspace.
  1716.  
  1717.        Return Value:  No value is returned.
  1718.  
  1719.        Example:       This example backspaces cursor over the prompt and
  1720.                       on the user's input local/remote consoles.
  1721.  
  1722.                       #include ckit.h
  1723.  
  1724.                       char prompt1 = "Enter filename to view: ";
  1725.  
  1726.                       main(int argc, char **argv) {
  1727.                         if (argc > 0) {
  1728.                           open_door(argv[1]);
  1729.                           s_puts("\r\nReady to test back_space()");
  1730.                           s_puts("Press a key when ready");
  1731.                           newline();
  1732.                           while(!(wait_keypress())) {
  1733.                         };
  1734.                         color(yellow);
  1735.                         s_puts(prompt1);
  1736.                         color(red);
  1737.                         get_cmdline();
  1738.                         back_space(strlen(prompt1) + strlen(cmdline));
  1739.                         close_door();
  1740.                       };
  1741.  
  1742.  
  1743.                                                                  Functions
  1744.  
  1745.        color                                     high level
  1746.        -------------------------------------------------------------------
  1747.        Summary:       #include "ckit.h"
  1748.                       void color(short);
  1749.  
  1750.        Description:   The color function selects color to use using ANSI.
  1751.                       Caller must be in graphics mode.  If not, no action
  1752.                       is taken.
  1753.  
  1754.        Return Value:  No value is returned.
  1755.  
  1756.        See Also:      Color macros above in macro section used with CKIT
  1757.  
  1758.        Example:       This example sets color to red (see color macros
  1759.                       above) on the local/remote consoles.
  1760.                       #include "ckit.h"
  1761.                       main(int argc, char **argv) {
  1762.                         if (argc > 0) {
  1763.                           open_door(argv[1]);
  1764.                           .
  1765.                           .
  1766.                           .
  1767.                           color(blue);
  1768.                           .
  1769.                           .
  1770.                           .
  1771.                           close_door();
  1772.                         };
  1773.                       };
  1774.  
  1775.  
  1776.                                                                  Functions
  1777.  
  1778.        get_cmdline                               high level
  1779.        -------------------------------------------------------------------
  1780.        Summary:       #include "ckit.h"
  1781.                       void get_cmdline(void);
  1782.  
  1783.        Description:   Read a line of input (max 128 bytes). Echo to
  1784.                       screen, leave cursor after the last key typed before
  1785.                       C/R. Automatically checks for time_left, carrier.
  1786.                       Calls input() and reads into array cmdline*,
  1787.                       automatically maps input to Uppercase.
  1788.                       Will also set key_source to source of input.
  1789.                       *defined in CKIT.H.  This function is the one
  1790.                       you would normally use for ALL user input.
  1791.                       ALL other input functions are intermediate or low
  1792.                       level functions.
  1793.  
  1794.        Return Value:  No value is returned.
  1795.  
  1796.        See Also:      input, get_nextpar, key_source, wait_keypress
  1797.  
  1798.        Example:       This example reads keyboard  from local/remote
  1799.                       console into array get_cmdline[].  It also checks
  1800.                       for any scan_codes receieved.  See Ckitdemo.c also.
  1801.             #include "ckit.h"
  1802.             main(int argc, char **argv) {
  1803.             open_door(argv[1]);
  1804.             do {
  1805.                 newline();
  1806.                 display_time();
  1807.                 color(green);
  1808.                 s_puts("Command? ");
  1809.                 get_cmdline();          /* read input into 'cmdline'  */
  1810.  
  1811.             } while((DUMP_USER != TRUE) && (strlen(cmdline) == 0) \
  1812.                    && (scan_code == 0));
  1813.         }
  1814.         if (DUMP_USER == TRUE) {
  1815.             close_door();
  1816.             exit(1);
  1817.         }
  1818.         if (scan_code != NULL) {
  1819.             color(white);
  1820.             read_scancode();
  1821.             newline();
  1822.         }
  1823.         if (get_nextpar()) { /* scan next parameter from cmdline into par */
  1824.             newline();
  1825.       /* process commands */
  1826.             switch ( par[0] ) {
  1827.                 case 'A':
  1828.                 ansi_demo();
  1829.                 break;
  1830.                 default:
  1831.                 color(magenta);
  1832.                 s_putv("(",par,") is not allowed!  Try again:", NULL);
  1833.                 *cmdline = NULL;
  1834.             }
  1835.         }
  1836.  
  1837.  
  1838.                                                                  Functions
  1839.  
  1840.        wait_keypress                             high level
  1841.        -------------------------------------------------------------------
  1842.        Summary:       #include "ckit.h"
  1843.                       short wait_keypress(void);
  1844.  
  1845.        Description:   Waits for any keypress. Does not wait for a C/R.
  1846.                       Autochecks for CARRIER,  TIMEOUTS etc.
  1847.  
  1848.                       Returns ASCII code of key pressed or TRUE if
  1849.                       DUMP_USER goes TRUE otherwise it will return FALSE.
  1850.                       Will also return TRUE if extended key is pressed.
  1851.                       Will not do so if a sysop function key is pressed.
  1852.                       Useful for "hot_key" applications. Will also set
  1853.                       key_source to proper value.
  1854.  
  1855.        Return Value:  ASCII code of keypressed or TRUE, FALSE
  1856.  
  1857.        See also: check_CR, check_keypress, input, get_cmdline
  1858.  
  1859.        Example:      This example will wait until a keypress or DUMP_USER.
  1860.  
  1861.                       #include "ckit.h"
  1862.                       prompt2 = ""Press any key to continue";
  1863.                       main(int argc, char **argv) {
  1864.                         if (argc > 0) {
  1865.                           open_door(argv[1]);
  1866.                           .
  1867.                           .
  1868.                           .
  1869.                           color(yellow);
  1870.                           newline();
  1871.                           s_puts(prompt2);
  1872.                           while(!(wait_keypress())) {
  1873.                           };
  1874.                           back_space(strlen(prompt2) + 1);
  1875.                           .
  1876.                           .
  1877.                           .
  1878.                           close_door();
  1879.                         };
  1880.                       };
  1881.  
  1882.  
  1883.                                                                  Functions
  1884.  
  1885.        force_enter                               high level
  1886.        -------------------------------------------------------------------
  1887.        Summary:       #include "ckit.h"
  1888.                       void force_enter(void);
  1889.  
  1890.        Description:   Prompts " Press Enter to continue: ", wait for C/R,
  1891.                       automatic carrier, time_left and sysop checks.
  1892.  
  1893.        Return Value:  NONE
  1894.  
  1895.        Example:       This example displays a string then prompts and
  1896.                       forces user to press C/R to continue.
  1897.                       #include "ckit.h"
  1898.                       main(int argc, char **argv) {
  1899.                         if (argc > 0) {
  1900.                           open_door(argv[1]);
  1901.                           .
  1902.                           .
  1903.                           .
  1904.                           color(yellow);
  1905.                           s_puts("Display this string\r\n");
  1906.                           force_enter();
  1907.                           .
  1908.                           .
  1909.                           .
  1910.                           close_door();
  1911.                         };
  1912.                       };
  1913.  
  1914.  
  1915.                                                                  Functions
  1916.  
  1917.        display_time                              high level
  1918.        -------------------------------------------------------------------
  1919.        Summary:       #include "ckit.h"
  1920.                       void display_time(void);
  1921.  
  1922.        Description:   Displays (xxxx used, xxx left)
  1923.  
  1924.        Return Value:  NONE
  1925.  
  1926.        See Also:
  1927.  
  1928.        Example:   See CKITDEMO.C also
  1929.           #include "ckit.h"
  1930.           main(int argc, char **argv) {
  1931.             open_door(argv[1]);
  1932.             if (argc > 0) {
  1933.               newline();
  1934.               do {
  1935.                 /* display_time_left; */
  1936.                 display_time();
  1937.                 color(green);
  1938.                 s_puts("Command? ", NULL);
  1939.                 get_cmdline();     /* read input into 'cmdline'  */
  1940.                 newline();
  1941.               } while( (DUMP_USER != TRUE) && ( strlen(cmdline) == 0 ));
  1942.             };
  1943.           close_door();
  1944.           };
  1945.  
  1946.  
  1947.                                                                  Functions
  1948.  
  1949.        get_cmdline_raw                           high level
  1950.        -------------------------------------------------------------------
  1951.        Summary:       #include "ckit.h"
  1952.                       void get_cmdline_raw(short);
  1953.  
  1954.        Description:   Same as get_cmdline() above but erases prompt of
  1955.                       after input and user input also.  Expects length
  1956.                       of prompt to be passed to it.
  1957.  
  1958.        Return Value:  No value is returned.
  1959.  
  1960.        See Also:      get_cmdline, get_nextpar, get_cmdline, input
  1961.  
  1962.        Example:       This example reads keyboard  from local/remote
  1963.                       console into array cmdline[], (filename), then
  1964.                       displays file.
  1965.  
  1966.                       #include "ckit.h"
  1967.  
  1968.                       char prompt1 = "Enter filename to display: ";
  1969.  
  1970.                       main(int argc, char **argv) {
  1971.                         if (argc > 0) {
  1972.                           open_door(argv[1]);
  1973.                           s_puts(prompt1);
  1974.                           get_cmdline_raw(strlen(prompt1));
  1975.                           newline();
  1976.                           display_file(cmdline);
  1977.                           close_door();
  1978.                         };
  1979.                       };
  1980.  
  1981.  
  1982.                                                                  Functions
  1983.  
  1984.        get_nextpar                               high level
  1985.        -------------------------------------------------------------------
  1986.        Summary:       #include "ckit.h"
  1987.                       char get_nextpar(void);
  1988.  
  1989.        Description:   Scans next from cmdline[] array into "par[]".
  1990.                        par defined in CKIT.H
  1991.  
  1992.        Return Value:  Returns 0 if none available, non-zero if cmd available
  1993.  
  1994.        See Also:      input, get_cmdline, cmdline and par in GLOBAL section.
  1995.  
  1996.        Example:       This example reads keyboard  from local/remote
  1997.                       console into array get_cmdline[], then calls
  1998.                       get_nextpar to scan for cmds entered.
  1999.  
  2000.      #include "ckit.h"
  2001.  
  2002.      main(int argc, char **argv) {
  2003.        if (argc > 0) {
  2004.          open_door(argv[1]);
  2005.          do {
  2006.             get_cmdline();    /* read input into 'cmdline'  */
  2007.          } while( (DUMP_USER != TRUE) && ( strlen(cmdline) == 0 ));
  2008.          if (get_nextpar()) { /* scan next parameter from cmdline into par */
  2009.          /* process commands */
  2010.             switch ( par[0] ) {
  2011.                 case 'A':
  2012.                 ansi_demo();
  2013.                 break;
  2014.                 default:
  2015.                 break;
  2016.             };
  2017.          };
  2018.        };
  2019.       close_door();
  2020.      };
  2021.  
  2022.                                                                  Functions
  2023.  
  2024.        nomore                                    high level
  2025.        -------------------------------------------------------------------
  2026.        Summary:       #include "ckit.h"
  2027.                       short nomore(void);
  2028.  
  2029.        Description:   Displays prompt:
  2030.                       "More: (Enter) or (Y)es, (N)o, (NS)nonstop? ".
  2031.                        Returns 0 = Non_stop
  2032.                                1 = Yes
  2033.                                2 = No
  2034.  
  2035.                       Also checks for CTRL K.
  2036.                       The "More:" prompt will be yellow,
  2037.                       the rest will be green.
  2038.  
  2039.        Return Value: short value, meaning described above/
  2040.  
  2041.        See Also:      get_def, get_defyn, get_defen
  2042.  
  2043.        Example:       This example loops 3 times to show what each
  2044.                       keypress (N,Y or NS) returns.
  2045.      #include "ckit.h"
  2046.  
  2047.      short      result, i;
  2048.  
  2049.      main(int argc, char **argv) {
  2050.        if (argc > 0) {
  2051.          open_door(argv[1]);
  2052.          for(i=0; i <= 2; i++) {
  2053.            s_puts("\r\nReady to test NOMORE 3 times");
  2054.            newline();
  2055.            while(!(wait_keypress())) {
  2056.            };
  2057.            result = nomore();
  2058.            printf("Nomore() returned  %d", result);
  2059.            newline();
  2060.         };
  2061.      close_door();
  2062.      };
  2063.  
  2064.                                                                  Functions
  2065.  
  2066.        get_defyn                                 high level
  2067.        -------------------------------------------------------------------
  2068.        Summary:       #include "ckit.h"
  2069.                       void get_defyn(char *, short)
  2070.  
  2071.        Description:   Displays prompt string and either
  2072.                       "Enter=yes " or "Enter=no" based on short value.
  2073.                       1st prompt will be yellow, default will be green.
  2074.                       If short is Non_zero it will display "Enter=Yes".
  2075.                       If short is Zero (NULL) it will display "Enter=No".
  2076.                       Calls get_cmdline for user input.
  2077.  
  2078.        Return Value:  None
  2079.  
  2080.        See Also:      cmd_line, get_def, get_defyn, get_defen
  2081.  
  2082.        Example:       This example loops 2 times to show what each
  2083.                       value or i displays.
  2084.      #include "ckit.h"
  2085.  
  2086.      short i;
  2087.  
  2088.      main(int argc, char **argv) {
  2089.        if (argc > 0) {
  2090.          open_door(argv[1]);
  2091.          for(i=0; i <= 1; i++) {
  2092.            s_puts("\r\nReady to test get_defyn()");
  2093.            newline();
  2094.            get_defyn("Continue? ", i);
  2095.            s_putv("You entered ", cmdline, NULL);
  2096.            newline();
  2097.         };
  2098.      close_door();
  2099.      };
  2100.  
  2101.                                                                  Functions
  2102.  
  2103.        get_defen                                 high level
  2104.        -------------------------------------------------------------------
  2105.        Summary:       #include "ckit.h"
  2106.                       void get_defen(char *)
  2107.  
  2108.        Description:   Same as get_defyn except the default string
  2109.                       "(Enter=none?) " will be appended.
  2110.                       1st prompt will be yellow, default will be green.
  2111.                       Calls get_cmdline for user input.
  2112.  
  2113.        Return Value:  None
  2114.  
  2115.        See Also:      cmd_line, get_def, get_defyn, get_defen
  2116.  
  2117.      #include "ckit.h"
  2118.  
  2119.      main(int argc, char **argv) {
  2120.        if (argc > 0) {
  2121.          open_door(argv[1]);
  2122.          s_puts("\r\nReady to test get_defne()");
  2123.          newline();
  2124.          get_defne("Enter filename? ");
  2125.          s_putv("You entered ", cmdline, NULL);
  2126.          newline();
  2127.      close_door();
  2128.      };
  2129.  
  2130.                                                                  Functions
  2131.  
  2132.        getdef                                    high level
  2133.        -------------------------------------------------------------------
  2134.        Summary:       #include "ckit.h"
  2135.                       void   get_def(char *, char *)
  2136.  
  2137.        Description:   Same as get_defen except both colored prompts
  2138.                       are user defineable.  The 1st prompt will be
  2139.                       yellow, the 2nd one green.
  2140.                       Calls get_cmdline for user input.
  2141.        Return Value:  None
  2142.  
  2143.        See Also:      cmd_line, get_def, get_defyn, get_defen
  2144.  
  2145.        Example:       Print 2 prompts, and print user input.
  2146.  
  2147.       static  char prompt1 = "Enter filename? "
  2148.       static  char prompt2 = "(Enter = quit)";
  2149.  
  2150.      #include "ckit.h"
  2151.  
  2152.      main(int argc, char **argv) {
  2153.        if (argc > 0) {
  2154.          open_door(argv[1]);
  2155.          s_puts("\r\nReady to test get_def()");
  2156.          newline();
  2157.          get_def(prompt1, prompt2);
  2158.          s_putv("You entered ", cmdline, NULL);
  2159.          newline();
  2160.      close_door();
  2161.      };
  2162.  
  2163.                                                                  Functions
  2164.  
  2165.        prompt_def                                high level
  2166.        -------------------------------------------------------------------
  2167.        Summary:       #include "ckit.h"
  2168.                       void prompt_def(char *, char *)
  2169.  
  2170.        Description:   Same as get_def except it does not call
  2171.                       get_cmdline. 1st prompt will be yellow,
  2172.                       2nd prompt green.
  2173.  
  2174.        Return Value:  None
  2175.  
  2176.        See Also:      cmd_line, get_def, get_defyn, get_defen
  2177.  
  2178.        Example:       Print 2 prompts.
  2179.  
  2180.       static  char prompt1 = "Enter filename? "
  2181.       static  char prompt2 = "(Enter = quit)";
  2182.  
  2183.      #include "ckit.h"
  2184.  
  2185.      main(int argc, char **argv) {
  2186.        if (argc > 0) {
  2187.          open_door(argv[1]);
  2188.          s_puts("\r\nReady to test prompt_def()");
  2189.          newline();
  2190.          prompt_def(prompt1, prompt2);
  2191.          get_cmdline();
  2192.          newline();
  2193.      close_door();
  2194.      };
  2195.  
  2196.                                                                  Functions
  2197.  
  2198.        getdefn                                   high level
  2199.        -------------------------------------------------------------------
  2200.        Summary:       #include "ckit.h"
  2201.                       void   get_defn(char *, char *)
  2202.  
  2203.        Description:   Same as get_def except appends "Enter=none" to end.
  2204.                       Calls get_cmdline for user input.
  2205.  
  2206.        Return Value:  None
  2207.  
  2208.        See Also:      cmd_line, get_def, get_defyn, get_defen
  2209.  
  2210.  
  2211.                                                                  Functions
  2212.  
  2213.        dos_shell                                 high level
  2214.        -------------------------------------------------------------------
  2215.        Summary:       #include "ckit.h"
  2216.                       short dos_shell(char *);
  2217.  
  2218.        Description:   Will shell to program pointed to by character string.
  2219.                       If you plan on doing any shells, you need to use this
  2220.                       function since it will disable the keyboard timer
  2221.                       while the shell is taking place and perform some other
  2222.                       clean up's upon re-entry.
  2223.  
  2224.        Return Value:  Error level return by program called. NULL = NO error
  2225.  
  2226.        NOTE: For some reason Turbo C 2.0 does not return the error_level of the
  2227.              called program.  TurboC++ does handle this properly.
  2228.  
  2229.        See also: F5 local shell to DOS, and CKITDEMO.C
  2230.  
  2231.        Example:  Download a file using Zmodem.
  2232.  
  2233.                       #include "ckit.h"
  2234.                       main(int argc, char **argv) {
  2235.                         if (argc > 0) {
  2236.                           open_door(argv[1]);
  2237.                           .
  2238.                           .
  2239.                           .
  2240.                           dos_shell("dsz sz pB4096 ckit.doc");
  2241.                           .
  2242.                           .
  2243.                           .
  2244.                           close_door();
  2245.                         };
  2246.                       };
  2247.  
  2248.  
  2249.                                                                  Functions
  2250.  
  2251.        display_file                              high level
  2252.        -------------------------------------------------------------------
  2253.        Summary:       #include "ckit.h"
  2254.                       short display_file(char *);
  2255.  
  2256.        Description:   Displays file to local/remote consoles.  Automatic
  2257.                       use of page_length, control K checks, MORE? prompting,
  2258.                       closes file when done. Expects a pointer to name/path
  2259.                       of file to display.  If page_length is 0, the
  2260.                       MORE? prompting will be disabled.  You can use this
  2261.                       to your advantage for files that you do not want
  2262.                       MORE? prompting by setting user.page_length to 0 before
  2263.                       calling display_file().  Just make sure you save the
  2264.                       original value of user.page_length if you need it later
  2265.                       on. This function will not automatically attempt to
  2266.                       display a graphic file if the user is in graphics.
  2267.                       For display non-interruptable menus, set page_length
  2268.                       to NULL before calling this function.
  2269.                       It is up to the door author to decide how he wants
  2270.                       to handle it. see below.
  2271.  
  2272.        Return Value:  Returns  non-zero if error.  If desired, you can then
  2273.                       check the C global _errno for the cause of the problem.
  2274.  
  2275.        See Also:      NONE
  2276.  
  2277.        Example:       This example displays the file ckit.m, then forces
  2278.                       user to press enter when done.
  2279.  
  2280.                       #include "ckit.h"
  2281.                       main(int argc, char **argv) {
  2282.                         if (argc > 0) {
  2283.                           open_door(argv[1]);
  2284.                           .
  2285.                           .
  2286.                           .
  2287.                           strcpy(filename, "ckit.m")
  2288.                           if(!graphics) {
  2289.                               (display_file(filename);
  2290.                            } else {
  2291.                                strcat(filename,"g");
  2292.                               (display_file(filename);
  2293.                            }
  2294.                           force_enter();
  2295.                           .
  2296.                           .
  2297.                           .
  2298.                         };
  2299.                         close_door();
  2300.                      };
  2301.  
  2302.                                                                  Functions
  2303.  
  2304.        debug_on                                  high level
  2305.        -------------------------------------------------------------------
  2306.        Summary:       #include "ckit.h"
  2307.                       void debug_on(void);
  2308.  
  2309.        Description:   A call to this function while debugging your door
  2310.                       will disable the keyboard timer among other things
  2311.                       while you are trying to debug your door.  Make
  2312.                       sure you remove this call before releasing your door
  2313.                       or the keyboard timeout will not function!  It should
  2314.                       only be called after open_door();.  This can also
  2315.                       be used if needed to use transmit_modem() while the
  2316.                       door is opened. This will disable DUMP_USER from
  2317.                       going true.  Make sure you turn debug back on!
  2318.                       using debug_off();
  2319.  
  2320.        Return Value:  NONE
  2321.  
  2322.  
  2323.        Example:
  2324.                       #include "ckit.h"
  2325.                       main(int argc, char **argv) {
  2326.                         if (argc > 0) {
  2327.                           open_door(argv[1]);
  2328.                           .
  2329.                           .
  2330.                           .
  2331.                           debug_on();
  2332.                           lower_dtr();    /* Drop user off */
  2333.                           raise_dtr();
  2334.                           ck_wait(1);     /* wait for modem to reset */
  2335.                           flush_RQUEUE(); /* Flush receive queue   */
  2336.                           transmit_modem("ATDT6159826537");
  2337.                           debug_off();
  2338.                           while(tqueue_len()); /* wait on modem */
  2339.                           newline();
  2340.                           delay(1);
  2341.                           while(DUMP_USER != TRUE) { /* wait for modem */
  2342.                             get_cmdline();
  2343.                             newline();
  2344.                             s_putv("Modem returned -> ",cmdline, NULL);
  2345.                             break;
  2346.                           };
  2347.                           .
  2348.                           .
  2349.                           .
  2350.                         };
  2351.                         close_door();
  2352.                      };
  2353.  
  2354.  
  2355.                                                                  Functions
  2356.  
  2357.        debug_off                                 high level
  2358.        -------------------------------------------------------------------
  2359.        Summary:       #include "ckit.h"
  2360.                       void debug_on(void);
  2361.  
  2362.        Description:   After a call to debug_on(), this will re-enable
  2363.                       keyboard timer, etc.
  2364.                       It should only be called after open_door();
  2365.  
  2366.        Return Value:  NONE
  2367.  
  2368.  
  2369.        Example:
  2370.        Example:
  2371.                       #include "ckit.h"
  2372.                       main(int argc, char **argv) {
  2373.                         if (argc > 0) {
  2374.                           open_door(argv[1]);
  2375.                           debug_on();  /* while debugging door */
  2376.                           .
  2377.                           .
  2378.                           .
  2379.                         };
  2380.                         debug_off();
  2381.                         close_door();
  2382.                      };
  2383.  
  2384.  
  2385.  
  2386.                                                                  Functions
  2387.  
  2388.        input                                     intermediate level
  2389.        -------------------------------------------------------------------
  2390.        Summary:       #include "ckit.h"
  2391.                       void input(BYTE *, short);
  2392.  
  2393.        Description:   Read a line of input with specified length. Echo to
  2394.                       screen, leave cursor after the last key typed before
  2395.                       C/R. Automatically checks for time_left, carrier.
  2396.                       Expects a char array pointer to store input and max.
  2397.                       length of input to read.  NOTE: Each call to input()
  2398.                       will purge the buffer in use to NULLS.  MAX length
  2399.                       must not exceed the size of your array and it must
  2400.                       not include the NULL char. (sizeof(array) - 1).
  2401.                       It will also set key_source = 1 or 2.
  2402.  
  2403.        Return Value:  No value is returned.
  2404.  
  2405.        See Also:      get_cmdline(), inkey(), getkey(), key_source, wait_keypress()
  2406.                       check_CTRL_K
  2407.  
  2408.        Example:       This example reads keyboard input from local/remote
  2409.                       console into array usr_input[] with max. bytes to
  2410.                       read equal to 100 bytes. Will set key_source
  2411.                       equal to source of input.
  2412.  
  2413.        NOTE:          This a "intermediate" level function.  You would not
  2414.                       normally need to use this function.  get_cmdline();
  2415.                       would normally be used and will handle all input
  2416.                       for you.
  2417.  
  2418.  
  2419.                       #include "ckit.h"
  2420.                       main(int argc, char **argv) {
  2421.                         if (argc > 0) {
  2422.                           open_door(argv[1]);
  2423.                           .
  2424.                           .
  2425.                           .
  2426.                           input(&usr_input[0], sizeof(usr_input) - 1);
  2427.                           .
  2428.                           .
  2429.                           .
  2430.                           close_door();
  2431.                         };
  2432.                       };
  2433.  
  2434.                                                                  Functions
  2435.  
  2436.        check_time_left                           intermediate level
  2437.        -------------------------------------------------------------------
  2438.        Summary:       #include "ckit.h"
  2439.                       void check_time_left(void);
  2440.  
  2441.        Description:   Checks time left on system, automatically sets
  2442.                       DUMP_USER if time expired.  Should be included
  2443.                       in all major program loops if you are going to use it.
  2444.  
  2445.        Return Value:  NONE
  2446.  
  2447.        See Also:      display_time, get_cmdline
  2448.  
  2449.        Example:       This function is normally handled by get_cmdline()
  2450.                       and input().  You do not normally need to use it.
  2451.                       #include "ckit.h"
  2452.                       main(int argc, char **argv) {
  2453.                         if (argc > 0) {
  2454.                           open_door(argv[1]);
  2455.                           .
  2456.                           .
  2457.                           .
  2458.                           check_time_left();
  2459.                           if(DUMP_USER == TRUE) {
  2460.                             close_door();
  2461.                           };
  2462.                           .
  2463.                           .
  2464.                           .
  2465.                           close_door();
  2466.                         };
  2467.                       };
  2468.  
  2469.                                                                  Functions
  2470.  
  2471.        adjust_time_allowed                       intermediate level
  2472.        -------------------------------------------------------------------
  2473.        Summary:       #include "ckit.h"
  2474.                       void adjust_time_allowed(short);
  2475.  
  2476.        Description:   Adjust user time left on system. Automatically
  2477.                       updates PCBoard.sys to reflect change.
  2478.                       This function will only be effective on systems
  2479.                       using pcboard.sys.
  2480.  
  2481.        Return Value:  NONE
  2482.  
  2483.        See Also:      
  2484.  
  2485.        Example:  For complete example see CKITDEMO.C included
  2486.  
  2487.        if (get_nextpar()) {  /* scan next parameter from cmdline into par */
  2488.         if (!strcmpi(thinking_of, par)) {
  2489.             color(green);
  2490.             s_puts("That's right!  You get a 10 minute bonus!");
  2491.             adjust_time_allowed(10);
  2492.         } else {
  2493.            color(blue);
  2494.            s_putv("Wrong! You lose 2 minutes! \
  2495.                    I was thinking of ", thinking_of,".",NULL);
  2496.                   adjust_time_allowed(-2);
  2497.         }
  2498.       }
  2499.  
  2500.  
  2501.                                                                  Functions
  2502.  
  2503.        check_event                               intermediate level
  2504.        -------------------------------------------------------------------
  2505.        Summary:       #include "ckit.h"
  2506.                       short check_event(void);
  2507.  
  2508.        Description:   Checks if time left will conflict with event.
  2509.  
  2510.        Return Value:  0 if no conflict, otherwise it will return the new
  2511.                       minutes left before event.
  2512.  
  2513.  
  2514.        See Also:      event_minutes, mins_before_event.
  2515.  
  2516.        EXAMPLE:      CKIT will automatically check for event conflicts.
  2517.                      This function would normally not be used.
  2518.  
  2519.  
  2520.  
  2521.                                                                  Functions
  2522.  
  2523.        event_minutes                             intermediate level
  2524.        -------------------------------------------------------------------
  2525.        Summary:       #include "ckit.h"
  2526.                       short event_minutes(void);
  2527.  
  2528.        Description:   Checks minutes past midnight event is scheduled.
  2529.                       This function is normally handled by CKIT.
  2530.                       This function would normally not be used.
  2531.  
  2532.        Return Value:  Number of minutes past midnight event is scheduled
  2533.                       to run.
  2534.  
  2535.        See Also:      check_event, mins_before_event.
  2536.  
  2537.                       #include "ckit.h"
  2538.  
  2539.                       main(int argc, char **argv) {
  2540.                         if (argc > 0) {
  2541.                           open_door(argv[1]);
  2542.                           .
  2543.                           .
  2544.                           .
  2545.                           short   event_mins;
  2546.                           event_mins = event_minutes();
  2547.                           .
  2548.                           .
  2549.                           .
  2550.                           close_door();
  2551.                         };
  2552.                       };
  2553.  
  2554.  
  2555.  
  2556.                                                                  Functions
  2557.  
  2558.        mins_before_event                         intermediate level
  2559.        -------------------------------------------------------------------
  2560.        Summary:       #include "ckit.h"
  2561.                       short mins_before_event(void);
  2562.  
  2563.        Description:   Check minutes left before event from current time.
  2564.  
  2565.        Return Value:  Minutes before event from current time.
  2566.  
  2567.        See Also:      check_event, event_minutes.
  2568.  
  2569.        Example:
  2570.                       #include "ckit.h"
  2571.  
  2572.                       main(int argc, char **argv) {
  2573.                         if (argc > 0) {
  2574.                           open_door(argv[1]);
  2575.                           .
  2576.                           .
  2577.                           .
  2578.                           short  mins_before_event;
  2579.                           mins_before_event = mins_before_event();
  2580.                           .
  2581.                           .
  2582.                           .
  2583.                           close_door();
  2584.                         };
  2585.                       };
  2586.  
  2587.  
  2588.                                                                  Functions
  2589.  
  2590.        delay                                     intermediate level
  2591.        -------------------------------------------------------------------
  2592.        Summary:       #include "ckit.h"
  2593.                       void delay(short);
  2594.  
  2595.        Description:   General purpose delay in milliseconds
  2596.                       Minumum of 55 ms.  (short must be >= 1)
  2597.                       This function is good only on the MSC librarys.
  2598.                       The TURBO librarys use Borland's DELAY() function.
  2599.  
  2600.        See also:      ck_wait
  2601.  
  2602.        Return Value:  NONE
  2603.  
  2604.  
  2605.  
  2606.  
  2607.                                                                  Functions
  2608.  
  2609.        ck_wait                                   intermediate level
  2610.        -------------------------------------------------------------------
  2611.        Summary:       #include "ckit.h"
  2612.                       void ck_wait(short);
  2613.  
  2614.        Description:   General purpose delay in seconds
  2615.                       Minumum of 1 sec. for now  (short must be >= 1)
  2616.                       less than one will result in 1/2 second delay.
  2617.                       Use delay above
  2618.  
  2619.  
  2620.        Return Value:  NONE
  2621.  
  2622.        See also:      Delay
  2623.  
  2624.  
  2625.  
  2626.                                                                  Functions
  2627.  
  2628.        purge_buffer                              intermediate level
  2629.        -------------------------------------------------------------------
  2630.        Summary:       #include "ckit.h"
  2631.                       void purge_buffer(BYTE *, short);
  2632.  
  2633.        Description:   purge_buffer will purge any buffer to NULLS by
  2634.                       passing a pointer to the buffer and the size of the
  2635.                       buffer. i.e purge_buffer(buffer, 0x80).
  2636.                       This may or may not be useful but is available.
  2637.  
  2638.            NOTE: There is a seperate purge function for the serial port
  2639.            input buffer if you wish to purge it before calling input.
  2640.            See flush_RQUEUE.
  2641.  
  2642.        Return Value:  NONE
  2643.  
  2644.        See also: flush_RQUEUE
  2645.  
  2646.                       static BYTE buff[256] = "This is purge buffer test";
  2647.  
  2648.                       #include "ckit.h"
  2649.  
  2650.                       main(int argc, char **argv) {
  2651.                         if (argc > 0) {
  2652.                           open_door(argv[1]);
  2653.                           .
  2654.                           .
  2655.                           .
  2656.                           purge_buffer(buff, 255);
  2657.                           .
  2658.                           .
  2659.                           .
  2660.                           close_door();
  2661.                         };
  2662.                       };
  2663.  
  2664.  
  2665.  
  2666.                                                                  Functions
  2667.  
  2668.        check_CR                                  intermediate level
  2669.        -------------------------------------------------------------------
  2670.        Summary:       #include "ckit.h"
  2671.                       void short check_CR(void);
  2672.  
  2673.        Description:   Check for a carriage return, does not wait, does
  2674.                       not display any prompts.
  2675.                       Returns TRUE or FALSE
  2676.  
  2677.        Return Value:  TRUE, FALSE
  2678.  
  2679.        See also: force_enter(), get_cmdline(), check_keypress()
  2680.  
  2681.  
  2682.  
  2683.                                                                  Functions
  2684.  
  2685.        check_CTRL_K                              intermediate level
  2686.        -------------------------------------------------------------------
  2687.        Summary:       #include "ckit.h"
  2688.                       short check_CTRL_K(void);
  2689.  
  2690.        Description:   Check if a CONTROL K (ASCII 11) has been entered.
  2691.                       Returns TRUE or FALSE
  2692.  
  2693.        Return Value:  TRUE, FALSE
  2694.  
  2695.        See also: CtrlK_OFF, CtrlK_ON
  2696.  
  2697.  
  2698.                                                                  Functions
  2699.  
  2700.        CtrlK_ON                                  intermediate level
  2701.        -------------------------------------------------------------------
  2702.        Summary:       #include "ckit.h"
  2703.                       void CtrlK_ON(void);
  2704.  
  2705.        Description:   Enables  CONTROL K (ASCII 11) checking.
  2706.                       This is normally off since most menu types are
  2707.                       non_interruptable.  If turned on, CTRL K will
  2708.                       be recognized.  Once on, you must call CtrlK_OFF()
  2709.                       (see below) to disable it.  CTRL K's are also NOT
  2710.                       put into the input buffer.  You have to use the
  2711.                       check_CTRL_K() function (see above) to determine
  2712.                       if a CTRL K has been pressed.
  2713.  
  2714.        See also:  CtrlK_OFF, check_CTRL_K()
  2715.  
  2716.                                                                  Functions
  2717.  
  2718.        CtrlK_OFF                                 intermediate level
  2719.        -------------------------------------------------------------------
  2720.        Summary:       #include "ckit.h"
  2721.                       void CtrlK_OFF(void);
  2722.  
  2723.        Description:   Disables CONTROL K (ASCII 11) checking.
  2724.  
  2725.        See also: CtrlK_ON, check_CTRL_K()
  2726.  
  2727.                                                                  Functions
  2728.  
  2729.         NOTE:  ALL the low level functions below are not normally
  2730.                needed and are handled automatically by CKIT in a
  2731.                higher level function.  Most of these functions
  2732.                do NO carrier detects, etc.  They are only provided
  2733.                in special cases that may need them.  Use with caution.
  2734.  
  2735.        inkey                                     low level
  2736.        -------------------------------------------------------------------
  2737.        Summary:       #include "ckit.h"
  2738.                       size_t inkey(void);
  2739.  
  2740.        Description:   Read character (if available) from local/remote
  2741.                       console.  Does not wait for input.  Also sets
  2742.                       key_source equal to SYSOP or USER_KEY
  2743.  
  2744.        Return Value:  Returns 0 if none available, otherwise returns key
  2745.                       pressed
  2746.  
  2747.        See Also:      input, sio_getbyte, key_source above in globals,
  2748.                       check_CTRL_K
  2749.  
  2750.        Example:       This example checks for A at the keyboard,
  2751.                       from local/remote console, returns TRUE or FALSE
  2752.  
  2753.                       #include "ckit.h"
  2754.  
  2755.                       main(int argc, char **argv) {
  2756.                         if (argc > 0) {
  2757.                           open_door(argv[1]);
  2758.                           .
  2759.                           .
  2760.                           .
  2761.                           if ( inkey() != 'A') {
  2762.                              return(FALSE);
  2763.                           } else {
  2764.                              return(TRUE);
  2765.                           }
  2766.                           .
  2767.                           .
  2768.                           .
  2769.                           close_door();
  2770.                         };
  2771.                       };
  2772.  
  2773.  
  2774.                                                                  Functions
  2775.  
  2776.        keystat                                   low level
  2777.        -------------------------------------------------------------------
  2778.        Summary:       #include "ckit.h"
  2779.                       short keystat(void);
  2780.  
  2781.        Description:   Check if character is available from local console.
  2782.                       Does not wait for input.
  2783.  
  2784.        Return Value:  Returns 0 if none available.  None-zero is available.
  2785.  
  2786.        See Also:      input, r_count, key_source above in globals,
  2787.  
  2788.        Example:       This example checks for keypress at the keyboard
  2789.                       local console, returns TRUE or FALSE
  2790.  
  2791.                       #include "ckit.h"
  2792.  
  2793.                       main(int argc, char **argv) {
  2794.                         if (argc > 0) {
  2795.                           open_door(argv[1]);
  2796.                           .
  2797.                           .
  2798.                           .
  2799.                           if ( keystat() ) {
  2800.                              return(FALSE);
  2801.                           } else {
  2802.                              return(TRUE);
  2803.                           }
  2804.                           .
  2805.                           .
  2806.                           .
  2807.                           close_door();
  2808.                         };
  2809.                       };
  2810.  
  2811.  
  2812.                                                                  Functions
  2813.  
  2814.        r_count                                   low level
  2815.        -------------------------------------------------------------------
  2816.        Summary:       #include "ckit.h"
  2817.                       short r_count(void);
  2818.  
  2819.        Description:   Check if character is available from remote console.
  2820.                       Does not wait for input.
  2821.  
  2822.        Return Value:  Returns NULL if none available else returns number
  2823.                       of characters in the recieve queue.
  2824.  
  2825.        See Also:      input, r_count, keystat.
  2826.  
  2827.        Example:       See flush_rqueue below
  2828.  
  2829.  
  2830.  
  2831.                                                                  Functions
  2832.  
  2833.        getkey                                    low level
  2834.        -------------------------------------------------------------------
  2835.        Summary:       #include "ckit.h"
  2836.                       size_t getkey(void);
  2837.  
  2838.        Description:   Read character (if available)  from local console.
  2839.                       Does not wait for input.
  2840.  
  2841.        Return Value:  Returns FALSE if none available. Zero if true.
  2842.  
  2843.        See Also:      input, getkey, keystat, check_CTRL_K
  2844.  
  2845.        Example:       This example read key from local console buffer and
  2846.                       print to screen.
  2847.  
  2848.                       #include "ckit.h"
  2849.  
  2850.                       size_t ch;
  2851.  
  2852.                       main(int argc, char **argv) {
  2853.                         if (argc > 0) {
  2854.                           open_door(argv[1]);
  2855.                           .
  2856.                           .
  2857.                           .
  2858.                           ch = getkey();
  2859.                           s_putc(ch);
  2860.                           .
  2861.                           .
  2862.                           .
  2863.                           close_door();
  2864.                         };
  2865.                       };
  2866.  
  2867.  
  2868.  
  2869.                                                                  Functions
  2870.  
  2871.        sio_getbyte                               low level
  2872.        -------------------------------------------------------------------
  2873.        Summary:       #include "ckit.h"
  2874.                       BYTE sio_getbyte(void);
  2875.  
  2876.        Description:   Read character (if available)  from remote console.
  2877.                       Does not wait for input.
  2878.  
  2879.        Return Value:  Returns NULL if none available else returns
  2880.                       character read.
  2881.  
  2882.        See Also:      input, sio_getbyte, keystat, check_CTRL_K
  2883.  
  2884.        Example:       This example reads byte from remote console buffer
  2885.                       and displays it, if one was available.
  2886.  
  2887.                       #include "ckit.h"
  2888.  
  2889.                       BYTE ch;
  2890.                       main(int argc, char **argv) {
  2891.                         if (argc > 0) {
  2892.                           open_door(argv[1]);
  2893.                           .
  2894.                           .
  2895.                           .
  2896.                           ch = sio_getbyte();
  2897.                           if(ch) {
  2898.                                 s_putc(ch);
  2899.                           };
  2900.                           .
  2901.                           .
  2902.                           .
  2903.                           close_door();
  2904.                         };
  2905.                       };
  2906.  
  2907.  
  2908.  
  2909.        lower_dtr                                 low level
  2910.        -------------------------------------------------------------------
  2911.        Summary:       #include "ckit.h"
  2912.                       void lower_dtr(void);
  2913.  
  2914.        Description:   Drops DTR on com port, causing modem to hang up.
  2915.  
  2916.        Return Value:  NONE
  2917.  
  2918.        See Also:        raise_dtr, transmit_modem, transmit_data
  2919.  
  2920.        Example:
  2921.                         see transmit_modem below
  2922.  
  2923.                                                                  Functions
  2924.  
  2925.  
  2926.        raise_dtr                                 low level
  2927.        -------------------------------------------------------------------
  2928.        Summary:       #include "ckit.h"
  2929.                       void raise_dtr(void);
  2930.  
  2931.        Description:   Raises DTR on com port, causing modem to hang up.
  2932.  
  2933.        Return Value:  NONE
  2934.  
  2935.        See Also:        lower_dtr, transmit_modem, transmit_data
  2936.  
  2937.        Example:
  2938.                         see transmit_modem below
  2939.  
  2940.  
  2941.                                                                  Functions
  2942.  
  2943.  
  2944.        force_offhook                             low level
  2945.        -------------------------------------------------------------------
  2946.        Summary:       #include "ckit.h"
  2947.                       void force_offhook(void);
  2948.  
  2949.        Description:   Drops DTR on com port, causing modem to hang up,
  2950.                       tells modem to go back offhook.
  2951.                       This function will wait 1 second after dropping
  2952.                       dtr and 2 seconds after raising DTR before
  2953.                       telling modem to go offhook.  This is normally
  2954.                       handled automatically by CKIT depeding on the
  2955.                       FORCEOFFHOOK setting.
  2956.  
  2957.        Return Value:  NONE
  2958.  
  2959.        See Also:     FORCEOFFHOOK above.
  2960.  
  2961.        Example:      Send a string to reset the modem if carrier
  2962.                      is lost.
  2963.  
  2964.                       #include "ckit.h"
  2965.  
  2966.                       main(int argc, char **argv) {
  2967.                         if (argc > 0) {
  2968.                           open_door(argv[1]);
  2969.                           .
  2970.                           .
  2971.                           .
  2972.                           force_offhook(); /* Dump user offline */
  2973.                           .
  2974.                           .
  2975.                           .
  2976.                         };
  2977.                         close_door();
  2978.                       };
  2979.  
  2980.  
  2981.                                                                  Functions
  2982.  
  2983.  
  2984.        transmit_data                             low level
  2985.        -------------------------------------------------------------------
  2986.        Summary:       #include "ckit.h"
  2987.                       void transmit_data(BYTE *);
  2988.  
  2989.        Description:   Send C string to remote console.
  2990.                       No echo to local console. Expects a pointer to either
  2991.                       a NULL terminate C string of type BYTE or char.
  2992.                       Check for carrier included.
  2993.  
  2994.        Return Value:  NONE
  2995.  
  2996.        See Also: transmit_modem
  2997.  
  2998.        Example:
  2999.                       #include "ckit.h"
  3000.  
  3001.                       static char remote_msg[] = "HELLO";
  3002.  
  3003.                       main(int argc, char **argv) {
  3004.                         if (argc > 0) {
  3005.                           open_door(argv[1]);
  3006.                           .
  3007.                           .
  3008.                           .
  3009.                           transmit_data(remote_msg);
  3010.                           .
  3011.                           .
  3012.                           .
  3013.                         };
  3014.                        close_door();
  3015.                       };
  3016.  
  3017.  
  3018.  
  3019.        transmit_modem                            low level
  3020.        -------------------------------------------------------------------
  3021.        Summary:       #include "ckit.h"
  3022.                       short transmit_modem(BYTE *);
  3023.  
  3024.        Description:   Send C string to modem/remote.
  3025.                       No echo to local console. Expects a pointer to either
  3026.                       a NULL terminate C string of type BYTE or char.
  3027.                       NO carrier checking is included.  If it returns
  3028.                       Non-Zero if error occured, otherwise it returns NULL.
  3029.  
  3030.        Return Value:  NONE
  3031.  
  3032.        See Also: transmit_data
  3033.  
  3034.        Example:
  3035.                 #include "ckit.h"
  3036.  
  3037.                 static char dialnumber[] = "ATDT6159707418";
  3038.                       #include "ckit.h"
  3039.                       main(int argc, char **argv) {
  3040.                         if (argc > 0) {
  3041.                           open_door(argv[1]);
  3042.                           .
  3043.                           .
  3044.                           .
  3045.                           debug_on();
  3046.                           lower_dtr();    /* Drop user off */
  3047.                           raise_dtr();
  3048.                           ck_wait(1);     /* wait for modem to reset */
  3049.                           flush_RQUEUE(); /* Flush receive queue   */
  3050.                           transmit_modem(dialnumber);
  3051.                           debug_off();
  3052.                           while(tqueue_len()); /* wait on modem */
  3053.                           get_cmdline();
  3054.                           strcmp(cmdline, "CARRIER");
  3055.                           .
  3056.                           .
  3057.                           .
  3058.                         };
  3059.                         close_door();
  3060.                      };
  3061.  
  3062.                                                          Functions
  3063.  
  3064.        tqueue_len                                low level
  3065.        -------------------------------------------------------------------
  3066.        Summary:       #include "ckit.h"
  3067.                       short tqueue_len(void);
  3068.  
  3069.        Description:   Check number of bytes left in Transmit RQUEUE.
  3070.                       Normally this routine is not needed but is available
  3071.                       if needed.
  3072.  
  3073.  
  3074.        Return Value:  Bytes left in XMIT QUEUE
  3075.  
  3076.        See Also:      
  3077.  
  3078.        Example:
  3079.                       #include "ckit.h"
  3080.  
  3081.                       static char modem_msg[] = "ATX4";
  3082.                       main(int argc, char **argv) {
  3083.                         if (argc > 0) {
  3084.                           open_door(argv[1]);
  3085.                           .
  3086.                           .
  3087.                           .
  3088.                           debug_on();
  3089.                           transmit_modem(message);
  3090.                           while(tqueue_len());
  3091.                           debug_off();
  3092.                           .
  3093.                           .
  3094.                           .
  3095.                         };
  3096.                        close_door();
  3097.                       };
  3098.  
  3099.  
  3100.                                                                  Functions
  3101.  
  3102.        flush_RQUEUE                              low level
  3103.        -------------------------------------------------------------------
  3104.        Summary:       #include "ckit.h"
  3105.                       void flush_RQUEUE(void);
  3106.  
  3107.        Description:   Flush bytes from Receive QUEUE buffer.
  3108.  
  3109.        Return Value:  NONE
  3110.  
  3111.        See Also: r_count, tqueue_len
  3112.  
  3113.        Example:
  3114.                       #include "ckit.h"
  3115.  
  3116.                       static char message[] = "ATH1";
  3117.  
  3118.                       main(int argc, char **argv) {
  3119.                         if (argc > 0) {
  3120.                           open_door(argv[1]);
  3121.                           .
  3122.                           .
  3123.                           .
  3124.                          flush_RQUEUE();         /* flush buffer */
  3125.                          transmit_modem(message);
  3126.                          while (r_count());      /* wait for response back */
  3127.                           .
  3128.                           .
  3129.                           .
  3130.                         };
  3131.                        close_door();
  3132.                       };
  3133.  
  3134.  
  3135.  
  3136.                                                                  Functions
  3137.  
  3138.        check_cd                                  low level
  3139.        -------------------------------------------------------------------
  3140.        Summary:       #include "ckit.h"
  3141.                       BYTE check_CD(void);
  3142.  
  3143.        Description:   Checks if carrier present. If present, returns
  3144.                       NON-zero.  Zero (NULL) means no carrier present.
  3145.  
  3146.        Return Value:  BYTE indicator of carrier present/
  3147.  
  3148.        See Also: DUMP_USER, transmit_data, transmit_modem
  3149.  
  3150.  
  3151.                                                                  Functions
  3152.  
  3153.        check_keypress                            low level
  3154.        -------------------------------------------------------------------
  3155.        Summary:       #include "ckit.h"
  3156.                       short check_keypress(BYTE);
  3157.  
  3158.        Description:   Check for any specific ASCII character entered.
  3159.                       Does not wait for a character.
  3160.  
  3161.                         This function may or may not be useful
  3162.                         but is available if needed for a "hot_key"
  3163.                         function in a door.  Does no carrier checking!
  3164.  
  3165.        Return Value:  TRUE, FALSE
  3166.  
  3167.        See also: check_CR, input(), getkey(), wait_keypress, check_CTRL_K
  3168.  
  3169.        Example:
  3170.  
  3171.                       #include "ckit.h"
  3172.  
  3173.                       BYTE result;
  3174.  
  3175.                       main(int argc, char **argv) {
  3176.                         if (argc > 0) {
  3177.                           open_door(argv[1]);
  3178.                           .
  3179.                           .
  3180.                           .
  3181.                           while {
  3182.                             !(result = check_keypress(0x41));
  3183.                           };
  3184.                           printf("Keypress returned %d", result);
  3185.                           .
  3186.                           .
  3187.                           .
  3188.                         };
  3189.                        close_door();
  3190.                       };
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.   CKIT based DOOR programs have many of the feature available for the
  3197. door author, and for the sysop using standard function keys such as:
  3198.  
  3199.              Function key
  3200.              ------------
  3201.                 F5              Shell to DOS
  3202.                 F8              Return user to system
  3203.                 F9              Toggle display on/off
  3204.                 F10             Chat mode  (use the ESCAPE key to exit)
  3205.               * F3              Toggle printer on/off
  3206.               * F4              Toggle pagebell on/off
  3207.               * F7              Toggle caller alarm on/off
  3208.  
  3209.              Alternate key
  3210.              -------------
  3211.                ALT-H            Toggle between different status lines
  3212.  
  3213.              * ALT-N            Toggle sysop on next
  3214.              * ALT-X            Toggle exit to dos after call
  3215.                                 and help lines
  3216.         Alternately pressing the ALT-H key will bring up
  3217.         the next status line screen.  The 1st screen is a help screen,
  3218.         the second second screen shows your COM port status.
  3219.  
  3220.  * The function keys marked with an "*"  will only be of use to systems
  3221.    using pcboard.sys.  The rest are functional with any system.
  3222.  
  3223.   Command stacking is also available and can be easily disabled if desired.
  3224. See the CKITDEMO.C for example of disabling command stacking.
  3225.                                   Files
  3226.                                  -------
  3227. CKIT.DOC     -  This file.
  3228.  
  3229. CKITDEMO.EXE - This is a very short program written to test CKIT libraries
  3230.                and for a short demo.  CKITDEMO.EXE is a compiled program
  3231.                using the CKIT library.
  3232.  
  3233. CKIT.H     - This is a standard C header file, to be included with your
  3234.              door program.  This file contains all the function prototypes,
  3235.              and variable names and types available from CKIT.
  3236.  
  3237. CKIT_MS.LIB - This file is the CKIT library file to access all of the CKIT
  3238. CKIT_MM.LIB  files that are linked into your door program for MSC.
  3239.  
  3240. CKIT_TS.LIB - This file is the CKIT library file to access all of the CKIT
  3241. CKIT_TM.LIB  files that are linked into your door program for TURBO C.
  3242.  
  3243. CKITDEMO.C - The source code for CKITDEMO demostrating a door written
  3244.               using CKIT functions.
  3245.  
  3246. DEMO.BAT   - Sample .bat file to compile and link using the CKIT.LIB
  3247.              Provided as an example.
  3248.  
  3249. CKIT_TC.ZIP - Contains TURBO C files
  3250.  
  3251. TCREAD.ME  - Information for TURBO C users
  3252.  
  3253. CKITDEMO.MAK -  TURBO C Make file for CKITDEMO door (for use as example)*
  3254.  
  3255. CKITS.PRJ    -  TURBO C Project file for CKITDEMO door (use as example)*
  3256.  
  3257. TCPPCKIT.PRJ -  TURBO C++ Project file for CKITDEMO door (use as example)*
  3258.  
  3259.      * For small models
  3260.  
  3261.  
  3262.    ATTENTION TURBO C USERS:  You must select WORD alignment when using
  3263.    functions from the TURBO librarys.  The default on BORLAND is BYTE
  3264.    alignment.  This will not work correctly.  See the file TCREAD.ME
  3265.    in the CKIT_TC.ZIP file.
  3266.    In addition, TURBO C++ users should also select standard stack
  3267.    frame alignment.
  3268.    Make a dir to work from. Copy the CKITDEMO.C, CKITDEMO.H, CKIT.H,
  3269.    the CKIT_T?.LIB's, and the TCPPCKIT.PRJ or CKITS.PRJ into the
  3270.    same dir.  Bring up the TURBO C IDE and select the proper project
  3271.    file and you can test the CKITDEMO.C.  Have it create an .exe file.
  3272.    This should get you started.   You can take it from here...
  3273.  
  3274.    This package can be freely distributed so long as it is not modified
  3275.    or sold for profit.  If you find that this program is valuable,  you 
  3276.    can  send me a donation for what you think it is worth.   I  suggest 
  3277.    at least $25.00 (USA exchange).   You will receive a program CKITREG.EXE.
  3278.    This  will register all future copies of CKIT with your registration
  3279.    number. This means you would only have to download the new versions
  3280.    from your favorite board, saving you long distance charges!
  3281.    For registration over $25.00, full access to all Nodes on Data-Comp will
  3282.    be made available.
  3283.  
  3284.    Send your contributions to:
  3285.  
  3286.       Rickie W. Belitz
  3287.       P.O. Box 5895
  3288.       Maryville, TN 37802-5895
  3289.  
  3290.                                  SUPPORT
  3291.                                -----------
  3292.  
  3293.    If you have any questions, suggestions, or bug reports, contact me at:
  3294.  
  3295.        Data-Comp BBS
  3296.        (615) 982-8723  (Hayes Ultra V.32)             (public  line)
  3297.        (615) 982-6537  (Hayes Ultra V.32)             (private line)
  3298.        (615) 982-6512  (USR HST Dual Standard V.32),  (private line)
  3299.        (615) 970-7418  (USR HST Dual Standard V.32),  (private line)
  3300.  
  3301.         NOTE: The board has automatic rollover on the phone lines.
  3302.         There is chance you could end up on one of the private lines
  3303.         with limited time.
  3304.  
  3305.    I can also be reached via mail networks thru INTELEC's SHAREWARE conference
  3306.    and Relaynet's DOORS conference.
  3307.  
  3308.  
  3309.                                ACKNOWLEDGEMENTS
  3310.                              --------------------
  3311.         I would like to give special thanks to my Co-sysop, Dean McGuire,
  3312.         who has patiently tested the door routines and for help preparing the
  3313.         documentation.
  3314.  
  3315.                                   GENERIC.SYS
  3316.                           --------------------------
  3317.    For maximum compatibility, CKIT will also read a file called
  3318. GENERIC.SYS.  This file can be created by the sysop desiring to run
  3319. the door and allow CKIT to operate.  This would allow your door to
  3320. operate on ANY BBS system.  (see compatibilty issues below).  The
  3321. GENERIC.SYS file is a standard ASCII file and contains 3 lines, each
  3322. followed by a carriage return, line feed.  The format is:
  3323.  
  3324.         line 1  -  The BBS operator's name.
  3325.         line 2  -  The COM port in use.
  3326.         line 3  -  Time allowed in door.
  3327.  
  3328.   When CKIT finds a GENERIC.SYS, it will ask the user for his/her first and
  3329. last names before opening the door.  After the user inputs their name,
  3330. the door will continue to load and run.  Below is an example GENERIC.SYS
  3331. file with a sysop name of Rickie, using Com port 1, and allowing 50 minutes
  3332. in the door.
  3333.  
  3334. Rickie
  3335. COM1:
  3336. 50
  3337.  
  3338.   Each line is followed by a C/R, L/F and the com port follows the same
  3339. format as the standard door.sys.  COM0: = Local Mode (same as door.sys)
  3340. See the compatibilty issues below for more information.
  3341.  
  3342.  
  3343.  
  3344.                              COMPATIBILITY ISSUES
  3345.                           --------------------------
  3346.    Although CKIT makes a lot information available to the user, the author
  3347.  has to decide on what particular information his or her door will require.
  3348.  Here are some general guidelines that may help.  Decide on exactly what
  3349.  information your door will need to operate.  Keeping this to a minimum
  3350.  increases your chances of maintaining compatibility thruout the different
  3351.  BBS's systems and versions thereof which CKIT supports.
  3352.  
  3353.    For example, let's assume you are designing a standard BBS game.  CKIT
  3354.  handles all the detailed information such as time left, carrier detect etc.
  3355.  All you would really need is some basic information.  Perhaps just the
  3356.  user's name and sysop name.   By keeping this type of information to the
  3357.  minimum, your door would work regardless of whether the sysop running your
  3358.  door used pcboard.sys, door.sys, callinfo.bbs or GENERIC.SYS on the command
  3359.  line..i.e,  game.exe c:\pcb\pcboard.sys OR game.exe c:\pcb\door.sys OR
  3360.  game.exe c:\wc\callinfo.bbs, OR game.exe c:\GENERIC.SYS OR
  3361.  game.exe c:\rbbs\DORINFOx.DEF;,  ANY  of these would work.  (If the sysop
  3362.  was running PCBoard 12.0, he would only be able to use pcboard.sys.
  3363.  In this case, CKIT would not only take care of deciding if it was a
  3364.  pcboard.sys file, door.sys file, WILDCAT! callinfo.bbs or DORINFOx.DEF, but
  3365.  also if it *is* a pcboard.sys file, whether it is a PCBoard 12.0 sys file
  3366.  or later, and then would read it properly!).   This would make your door
  3367.  compatible with the full spectrum of PCBoard 12.0-14.5, WILDCAT!, GAP,
  3368.  SPITFIRE 3.0, other systems using the standard door.sys file, RBBS and
  3369.  others using DORINFO1.DEF and ANY BBS using GENERIC.SYS with minimum effort
  3370.  on the part of the sysop running your door.  Once you've written this
  3371.  fantastic new door, if it's a snap for a Sysop to install it, this might
  3372.  make him a bit more inclined to register it, right?
  3373.  
  3374.    Another senario would be if your door needs somewhat more than the basic
  3375.  information.  I would recommend using the variables available in door.sys
  3376.  and WILDCAT! info file in this case.  This would give you the broadest
  3377.  coverage for your door. If you will notice in the variables descriptions
  3378.  in this manual, there is a compatibility list to the right of each variable.
  3379.  This tells you which and what type of information is available to you
  3380.  depending on whether your door found a door.sys, pcboard.sys (and which
  3381.  version of PCBoard), WILDCAT! info file and DORINFOx.DEF file.  Below
  3382.  is a summary and quick guide to each pcboard.sys version, door.sys,
  3383.  WILDCAT!, DORINFOx.DEF info file and which information variables are
  3384.  available with each.
  3385.  
  3386.    If you need EVEN more information, then you can tell CKIT to open the
  3387.  users file and read information.  Doing so will limit your door to PCBoard
  3388.  systems only.  CKIT will NOT record any information to the user's file.
  3389.  It is a read only function.  You may also want to record new information
  3390.  to the users file.   CKIT has the capability of doing so and if you need
  3391.  this, contact me and we can work something out.  This is mainly for safety
  3392.  reasons.
  3393.  
  3394.                      Compatible with...
  3395.                      ----------------------------------------------------------
  3396.                      PCBoard.sys
  3397.    Variable          12.0  14.0-14.5  DOOR.SYS  WILDCAT! DORINFOx.DEF GENERIC.SYS
  3398.  --------------      ----  --------   --------  -------  -----------  -----------
  3399.  *conferences                             X         X
  3400.  aport                 X     X            X         X      X             X
  3401.  ansi_NG                                  X
  3402.  BBSname                                                   X
  3403.  bps_open                    X            X         X
  3404.  baud_rate             X     X            X         X      X
  3405.  callalarm             X     X            X
  3406.  current_conference    X     X            X
  3407.  caller_bday                              X         X
  3408.  display               X     X            X         X      X
  3409.  default_color                            X
  3410.  daily_bytes                              X         X
  3411.  daily_files                              X         X
  3412.  download_Kbytes                          X         X
  3413.  door_opened                                        X
  3414.  dload_total                 X            X         X
  3415.  error_connection      X     X            X         X
  3416.  expert                X     X            X         X
  3417.  event_active                X
  3418.  event_time                  X            X         X
  3419.  firstname             X     X            X         X      X             X
  3420.  fullname              X     X            X         X      X             X
  3421.  graphics              X     X            X         X      X
  3422.  gen_dir                                  X
  3423.  high_msg                                           X
  3424.  key_source            X     X            X         X      X
  3425.  local                 X     X            X         X      X
  3426.  logoff_color          X     X            X         X
  3427.  exit_msg              X     X            X         X      X
  3428.  language              X     X
  3429.  last_file_scan        X     X            X         X
  3430.  min_left              X     X            X         X      X             X
  3431.  main_dir                                 X
  3432.  max_files                                X
  3433.  max_sec                                            X
  3434.  monitor_type                                       X
  3435.  msgs_left                                X
  3436.  name_in_use                                        X
  3437.  netchat               X     X
  3438.  node                        X            X         X      X
  3439.  printer               X     X            X
  3440.  protocol              X     X            X         X
  3441.  pagebell              X     X            X
  3442.  password              X     X            X         X
  3443.  page_length           X     X            X         X      X
  3444.  PCB                   X     X            X         X      X
  3445.  PCB12                 X     X            X         X      X
  3446.  prev_used                   X
  3447.  port                  X     X            X         X      X
  3448.  parity                                   X         X
  3449.  RBBS                  X     X            X         X      X             X
  3450.  record_lock                              X
  3451.  scan_code             X     X            X         X      X
  3452.  security_level                           X         X      X
  3453.  slide_event                 X
  3454.  sysop_next            X     X
  3455.  sysop_name                               X                X             X
  3456.  sysop_alias                              X
  3457.  time_logged           X     X            X         X      X
  3458.  time_on               X     X
  3459.  time_limit            X     X
  3460.  time_added            X     X
  3461.  total_doors                              X
  3462.  user_record           X     X            X         X
  3463.  upload_Kbytes                            X
  3464.  upload_total                X            X         X
  3465.  user.city             X     X            X         X      X
  3466.  user.comment1               X            X
  3467.  user.expire_date            X            X
  3468.  user.phone                  X            X         X
  3469.  WILDCAT               X     X            X         X      X
  3470.  
  3471.  One last note - There are three variables PCB12, PCB and WILDCAT.  When CKIT
  3472.  reads a pcboard.sys file, it will set the PCB variable TRUE.  If the
  3473.  pcboard.sys file it read was a 12.0 file, it will set the PCB12 variable true.
  3474.  If CKIT finds a WILDCAT system, it will set the variable WILDCAT true.  This
  3475.  may be useful in making adjustments to your program depending on which system
  3476.  file was read (PCB, DOOR.SYS, PCB12, WILDCAT)  and/or if a sysop was running
  3477.  PCBoard 12.0 and you normally expected door.sys or wildcat info file.
  3478.  
  3479.  Also, see the users file information earlier in the doc file.  Some of the
  3480.  users structure information is available even if you are just using door.sys.
  3481.  If you do tell CKIT to open the users file, all the users file information
  3482.  above will be available, if CKIT finds a version 14.x pcboard.sys.  If it
  3483.  finds a PCBoard 12.0 pcboard.sys file, some, but not all, of the users
  3484.  structure information will be available.  Each member of the users structure
  3485.  is marked to indicate what is available and what is not depending on the
  3486.  things just mentioned.
  3487.  
  3488.  
  3489.                                                                   Warranty
  3490.  
  3491.                                   Warranty
  3492.                                 ------------
  3493.        I make no warranty of any kind, express or implied, including
  3494.        without limitation, any warranties of merchantability and/or
  3495.        fitness for a particular purpose.  I shall not be held liable for
  3496.        any  damages, whether direct, indirect, special or consequential
  3497.        arising from a failure  of this program to operate in the manner
  3498.        desired by the user.  I shall not be held liable for any damage to
  3499.        data or property which may be caused directly or indirectly by the
  3500.        use of this program.
  3501.  
  3502.        In no event will I be held liable for any damages, including (but
  3503.        not limited to) any lost profits, lost savings or other incidental
  3504.        or consequential damages arising out of the use or inability to
  3505.        use this program, or for any claim by any other party.
  3506.  
  3507.        This warranty is governed by the laws of the State of Tennessee.
  3508.  
  3509.  
  3510.                                  ORDER.FRM
  3511.                                -------------
  3512.  
  3513.                                    Return to:     Rickie Belitz
  3514.                                                   P.O. Box 5895
  3515.                                                   Maryville, TN 37802-5895
  3516.  
  3517.   Name ______________________________________________________________
  3518.  
  3519.   Company ___________________________________________________________
  3520.  
  3521.   Address ___________________________________________________________
  3522.  
  3523.           ___________________________________________________________
  3524.  
  3525.   Phone _____________________________________________________________
  3526.  
  3527.   Register CKIT to:  Name____________________________________________
  3528.  
  3529.   Diskette size:  ____ 5.25" acceptable       ____ 3.5" required*
  3530.  
  3531.   Canadian residents add $4.00 (current exchange rate)     _________
  3532.  
  3533.   *Add $4.00 for 3.5" diskettes 720K ___ 1.44 ___          _________
  3534.  
  3535.       Please find enclosed a check or money order for USA $_________
  3536.   ($25.00 suggested) payable to Rickie Belitz.  This shows my support
  3537.   of Shareware products and the Shareware concept.  It also shows my
  3538.   encouragement to help further development of CKIT.
  3539.  
  3540.       I understand that CKIT is provided as-is and no warranties of
  3541.   any kind, expressed or otherwise, are included and that I am using
  3542.   it at my own risk.
  3543.  
  3544.   Signed: _________________________________________  Date: _________
  3545.  
  3546.  
  3547.  
  3548.                                  RELEASE HISTORY
  3549.                                -------------------
  3550. 01-May-90 v1.0
  3551.    Initial BETA testing as CKIT10ß.ZIP
  3552.  
  3553.         Beta 1.0 release.  The next release of CKIT, I predict, should have
  3554.         about a 15% to 20% reduction in code size. If you find any problems
  3555.         with CKIT, please contact me at the phone numbers/address above.
  3556.  
  3557. 01-Jun-90 v1.0
  3558.     Release of version 1.0
  3559.  
  3560. 13-Jun-90 v1.0
  3561.     Release of version 1.0A
  3562.  
  3563.         Added library support for TURBO C. Added wait function.
  3564.     Minor documention fixes.
  3565.  
  3566. 16-Jun-90 v1.0
  3567.     Release of version 1.0B
  3568.  
  3569.         Fixed a minor error in the TURBOC small library.  I had
  3570.         left a INCLUDELIB in the code by mistake and you were
  3571.         forced to use the /N Tlink switch.  This has been corrected
  3572.         and the use of /n is no longer needed.
  3573.  
  3574. 20-Jun-90 v1.0
  3575.     Release of version 1.0C
  3576.  
  3577.         Fixed another minor problem where the assembler I used had
  3578.         converted all my functions to uppercase in the .obj file.
  3579.         I thought the default was to not do that but as it turns out
  3580.         it wasn't.  Now all the library function names/variables are
  3581.         the right case.
  3582.  
  3583.  
  3584. 25-Jun-90 v1.05
  3585.     Release of version 1.05
  3586.  
  3587.         Added support for 16550AN UART.  The code will take advantage
  3588.         of 16550AN chip if present.  Added caller log function.
  3589.         Begin including the medium library with Zip.  This was done
  3590.         because of the self-registering feature.  Took out time limit
  3591.         that CKIT originally had.  Future releases will not have any
  3592.         limitations.
  3593.  
  3594. 25-Jul-90 v1.1
  3595.     Release of version 1.1
  3596.         This release was a little premature.  I went ahead and released
  3597.         it since it did fix a couple of problems. * indicates a new
  3598.         feature.
  3599.  
  3600.         Display_file() -
  3601.         a. It will now put a space before the filename when it reports a
  3602.            problem.
  3603.         b. The EOF is no longer displayed.
  3604.         c. display_file() will now correctly display text files that have ANSI
  3605.            codes embedded in the file.
  3606.         d. CTRL-K now works on the local keyboard. (The remote keyboard was OK)
  3607.       * e. display_file() will now return TRUE/FALSE to indicate whether a
  3608.            problem had occured.  You can then check the C global variable
  3609.            _errno for cause of error.
  3610.       * f. Fixed problem when user.page_length was equal to 0.  See the
  3611.            CKIT.DOC for hints on how to take advantage of this feature.
  3612.  
  3613.     2. display_time() -  Would not update to the time used until after
  3614.                         two carriage returns were entered.  fixed
  3615.     3. input()
  3616.  
  3617.         a. Control characters or any non-displayable characters below 1F hex
  3618.            will not increase the counter.  This corrects the problem of being
  3619.            able to backspace too far and erasing the prompts.
  3620.       * b. Each call to input() now will purge the buffer into which you wish
  3621.            to place keyboard input.  You should no longer have to include the
  3622.            statement memset(buffer, 0, 21) before calling input().
  3623.       * c. A new function purge_buffer will purge any buffer to NULLS by
  3624.            passing a pointer to the buffer and the size of the buffer.
  3625.            i.e purge_buffer(buffer, 0x80).
  3626.            This may or may not be useful but is available.
  3627.  
  3628.          NOTE: There is a separate purge function for the serial port input
  3629.            buffer if you wish to purge it before calling input.
  3630.            See CKIT.DOC
  3631.  
  3632.       * d. New function available called check_keypress. Checks for any
  3633.            specific ASCII character.
  3634.            This function will return TRUE/FALSE as defined in CKIT.DOC.
  3635.  
  3636.       * e. Another new function called check_CR will check for a carriage
  3637.            return and return TRUE/FALSE.
  3638.  
  3639.  
  3640.     4. get_nextpar() - Would only accept 2 stacked commands, fixed.
  3641.  
  3642.     While working on the get_nextpar() function,  I went ahead and targeted
  3643.     it for some optimization along with the get_cmdline() function.
  3644.       The results are:
  3645.         get_nextpar() is now smaller and 7% faster.
  3646.         get_cmdline() is now smaller and 45% faster.
  3647.     Overall, with all the corrections and added functions the .obj file for
  3648.     CKIT is now 2% SMALLER than before.
  3649.  
  3650. 11-Aug-90 v1.5
  3651.     Release of version 1.5
  3652.         Ckit is now compatible with PCBoard version 12.0, 14.x-14.5, GAP
  3653.         BBS, and other BBS systems using the standard door.sys file.
  3654.         The level of compatiblity is up to the door author and the type
  3655.         of information needed.  There is a lot of information available,
  3656.         but by keeping this to a minimum, the door author can write his
  3657.         door to be compatible with all the systems above with no extra
  3658.         instructions to the user of the door except for the PCBoard
  3659.         sysop to use either pcboard.sys or door.sys.  (Version 12.0
  3660.         would have to use pcboard.sys and all others use door.sys.)
  3661.         CKIT will automatically determine which file to read and which
  3662.         PCBoard version is in use.  See the compatiblity section in this
  3663.         doc file for more information and a Variables Quick-Reference.
  3664.  
  3665.         Added more features and cosmetics to the program's status line
  3666.         for the sysop's use...
  3667.         F8      - Return user to BBS.  This was always there, I just
  3668.                   forgot to document it.  :)
  3669.         F5      - Shell to DOS
  3670.         ALT-X   - Sets the PCBoard's exit to DOS after caller flag
  3671.         ALT-N   - Sets the PCBoard's sysop on next after caller flag
  3672.         ALT-H   - Display Help Screen on sysop status line, and next
  3673.                   ALT-H will show com port status
  3674.  
  3675.         Functions added are:
  3676.  
  3677.         dos_shell(char *) - Allow door author to shell to another program
  3678.                               for execution if desired.  See CKIT.DOC
  3679.  
  3680.         _debug_on(void);  - Turns off keyboard timer and other things
  3681.                             while door author is debugging his door.
  3682.  
  3683.         Additional variables:
  3684.         short   PCB12, expert, parity, *conferences, current_conference,
  3685.                 caller_bday[8], main_dir[15], gen_dir[15], sysop_name[15],
  3686.                 sysop_alias[15], page_length, ansi_ng, default_color[2],
  3687.                 last_dir_scan[8], daily_files[4], total_doors[4],
  3688.                 msgs_left[4], max_files[4], upload_Kbytes[10],
  3689.                 download_Kbytes[10], dload_total[5], upload_total[5]
  3690.  
  3691.   -     Added my own math routine so you no longer have to include
  3692.         MATH.LIB if you are using TC compiler.
  3693.  
  3694.   -      Reduction of code size by about 20% relative.
  3695.  
  3696. 13-Aug-90 v1.5A
  3697.     Release of version 1.5A
  3698.         I can't believe I did this.  After telling everyone to make
  3699.         sure and not have debug_on in the released versions of their
  3700.         door,  I released CKIT with debug on!.  As a result, the
  3701.         keyboard timer and some other things would not work
  3702.         properly. This release with a code date 8/13/90 will work
  3703.         properly.
  3704.  
  3705. 19-Aug-90 v1.6
  3706.     Release of version 1.6
  3707.   -     Added support for WILDCAT! systems.  The following additonal
  3708.         information is available for WILDCAT! users.
  3709.         Additional WILDCAT! variables:
  3710.                 monitor_type[5], max_sec[5], high_msg[5], door_opened[5],
  3711.                 BYTE name_in_user
  3712.  
  3713.   -     Additional variables for general use by any system:
  3714.         short WILDCAT, protocol[15], security_level[5]
  3715.  
  3716.         See the CKIT.DOC for explanations and the compatibility chart.
  3717.  
  3718.   -     clr_screen() was not properly handling NON_ANSI callers.  fixed
  3719.  
  3720.   -     progname[] was changed to progname[21].  Previously it was [20]
  3721.  
  3722.   -     Under certain circumstances, a parsing routine in CKIT could get
  3723.         hung up.  fixed.
  3724.  
  3725.   -      Reduction of code size by about 5% relative.
  3726.  
  3727.   -     Fixed some documentation errors.  In particular, you may want to
  3728.         reprint the open_door() page and progname variable page.
  3729.         Also there are new variables listed above in the doc file and
  3730.         the compatibility chart has been upgraded.
  3731.  
  3732.   -     Look over the NEW CKITDEMO.C and CKITDEMO.H files.  The demo
  3733.         demostrates some use of added features, (zmodem download,
  3734.         pcb, wildcat! etc).
  3735.  
  3736. 01-Sep-90 v1.7
  3737.     Release of version 1.7
  3738.  
  3739. -   Added support for reading scan codes from non-standard keys on
  3740.     IBM keyboards. (F1-F10, Arrows, PgUp, PgDn, etc).
  3741. -   Ability to define the logoff message and color
  3742. -   Ability to change the port address and IRQ if needed.
  3743.     PORT:AAAA:A where AAAA equal to port base address and A is IRQ
  3744.     i.e PORT:02F8:3 would be the same as COM2.
  3745. -   Additonal variables:
  3746.     short scan_code, short logoff_color, char exit_msg[40]
  3747. -   Additonal functions:
  3748.     short wait_keypress(void) for "hot_keys".
  3749. -   open_door()'s prototype has been changed.  This allows one to pass
  3750.     as many parameters as desired (up to the max. of 3), without having
  3751.     to pass any dummy pointers.
  3752. -   Fixed a problem in the cmd line where certain command line
  3753.     parameters (callinfo.bbs and pcboard.sys) passed were case sensitive.
  3754.     This caused CKIT to read them incorrectly.
  3755. -   Cleaned up the status line display when certain information was not
  3756.     available depending on which file was opened. (pcboard, door.sys, callinfo)
  3757. -   Additional documentation added and improvements.
  3758.     Classified functions into groups.
  3759.     Once again, see open_door() for some changes and key_source.
  3760.     The option variable documention has also been updated.
  3761.     Also see the ckitdemo.c for more examples.
  3762.  
  3763. 16-Sep-90 v1.71
  3764.     Release of version 1.71
  3765.         This release was intended to be a maintenance release.
  3766.         There were, however, a few things added and a couple items
  3767.         repaired.
  3768.  
  3769. -   Added a function to re-enable keyboard timer after it had been
  3770.     turned off by a previous call to debug_on().  The new function
  3771.     name is debug_off().
  3772.  
  3773. -   Added the ability to define your own error message for the
  3774.     display_file() function.  error_msg11[40].  If you don't
  3775.     define it, CKIT will use it's default.
  3776.  
  3777. -   More and more and more documentation updates and examples.
  3778.     Too many additions to list here.  Mostly more examples and
  3779.     better explanations.
  3780.  
  3781. -   Fixed the display_file() function so that it will properly
  3782.     handle files that did not contain line feeds.  There will
  3783.     also be a future release of display_file() that will handle
  3784.     the ANSI screens better and include PCB color macros.
  3785.  
  3786. -   Close door was clearing the screen when exiting.  It no
  3787.     longer does this.
  3788.  
  3789. -   Fixed the More: (Y)es, (N), (NS)non-stop prompt.  Somehow
  3790.     in the last release, the last part of the string was missing
  3791.     from the source code.
  3792.  
  3793. -   Also missing in the last release source code was the public
  3794.     declares for transmit_modem, set_r_c and another function.
  3795.     Not sure how this happened but it did.  Your linker will now
  3796.     find these.
  3797.  
  3798. -   The page_length should be accurate now.  The bug that was in
  3799.     PCBoard's 14.5 door.sys has been fixed and I changed CKIT to
  3800.     give the true page length.
  3801.  
  3802. 12-Nov-90 v1.75
  3803.  
  3804. -   Added a function to update user record IF you are writing the
  3805.     door for use with PCBoard 14.5.  The new function name is
  3806.     update_user().
  3807.  
  3808. -   Added the ability to turn on and off Control K checking, if
  3809.     desired.  This involves the additon of 3 functions.
  3810.     CtrlK_ON, CtrlK_OFF, and check_CTRL_K.
  3811.  
  3812. -   Added chat mode via function key 10.  Also a variable
  3813.     short chatmode is set to TRUE when chat mode has taken
  3814.     place.
  3815.  
  3816. -   CKIT will now read a file called GENERIC.SYS.  This file
  3817.     will allow the door to work on ANY BBS system, depending on
  3818.     the level of information required for door.
  3819.  
  3820. -   Added some enhancements to the status line for the COM port
  3821.     status.  It will now display the status of CTS, DTR, DSR
  3822.     and DCD.
  3823.  
  3824. -   Fixed a problem with ALL the medium models.  Also fixed a
  3825.     problem with the delay() function in the MSC libraries.
  3826.     There is also a large memory model now available for
  3827.     registered users.
  3828.  
  3829. 24-Nov-90 v1.75A
  3830.  
  3831. -   Fixed a problem in the last release for sysops using the
  3832.     pcboard.sys file.  CKIT would always report "Time adjusted
  3833.     for upcoming event".
  3834.  
  3835.  
  3836. 15-Feb-91 v1.75C
  3837.  
  3838. -   Not sure what happend 1.75B but anyway, the C version fixed
  3839.     a few loose ends.
  3840.  
  3841. -   Fixed code so that door.sys, wildcat, and generic.sys files are closed
  3842.     after a call to open_door().
  3843.  
  3844. -   Changed so that if sysop is logged on,  (using pcboard.sys),  the
  3845.     firstname will be set to what is in the pcboard.sys file instead
  3846.     of "sysop".
  3847.  
  3848. -   Added a pointer to the internal buffer that pcboard.sys is held and
  3849.     which will be used to update pcboard.sys when returning to the board.
  3850.     Added pointer to internal pcboard.sys buffer - BYTE *pcbsysbuf
  3851.  
  3852. -   Changed logoff_msg[] to exit_msg[].   logoff_msg[] is now displayed if
  3853.     the user says good-bye within the door.  See CKIT.H for the macros
  3854.     LOGOFF and EXITDOOR.  The complete log-off routines and source code
  3855.     for reading pcboard.dat files are on Data-Comp BBS.  These can be
  3856.     linked with CKIT if you want to add a log-off feature for PCBoard
  3857.     doors.
  3858.  
  3859.  
  3860. 24-Mar-91 v1.76
  3861.  
  3862. -   Added support for RBBS-PC and other systems using the DORINFOx.DEF
  3863.     system files.
  3864.  
  3865. -   Source code for reading PCBoard data files are available on Data-Comp BBS
  3866.     and may be linked with your C door program if desired.   RBBS and
  3867.     and others will be as they become available.
  3868.  
  3869. 05-Apr-91 v1.76A and 1.76B
  3870.  
  3871. -   Added s_printf() function.  This will allow you to format
  3872.     your output the same as you would use printf().  You
  3873.     must include the source code in the CKIT.DOC to use it.
  3874.     See the CKITDEMO.C and CKIT.H.  This function is not
  3875.     really part of the ckit libraries so you must include
  3876.     the source code for s_printf() in your program.  The
  3877.     source can be found in the docs under s_printf or the
  3878.     CKIT.H file.
  3879.  
  3880. -   Fixed a problem with input(). If the user tried to exceed
  3881.     the maximum length of your input buffer CKIT would
  3882.     display some garbage chars.
  3883.  
  3884. 06-Apr-91 v1.76C
  3885.  
  3886. -   Fixing the input() problem created another problem whereas
  3887.     CKIT would not display the exit_msg when returning to the
  3888.     BBS. Fixed.
  3889.  
  3890.                           SOME COMMON PROBLEMS/QUESTIONS
  3891.                           ------------------------------
  3892.  
  3893. Q. When linking my code with the library I get a linker error -
  3894.    Unresolved external _progname in CKIT3.ASM.
  3895.  
  3896. A. CKIT will look for a C string array called progname[21];.  This the
  3897.    name of your door program and will appear at the bottom of the local
  3898.    line.  This is not an option.  You must declare some kind of name
  3899.    for CKIT to use even if it just a space char if you don't want your
  3900.    progname at the bottom.  See the CKIDEMO.H file for example and
  3901.    the variable progname[] in the doc file.
  3902.  
  3903. Q. When linking your ckitdemo program, I get an error -
  3904.    Unresolved external _random in ckitdemo.c
  3905.  
  3906. A. The Ckitdemo.c door was written to be compiled with either Microsoft C
  3907.    or Turbo C.  As such, there are compiler directives in the CKITDEMO.C
  3908.    file that will take appropriate action depending on the compiler.
  3909.    Therefore, when compiling the CKITDEMO.C program, you must have the
  3910.    statement -DCOMPILER=MICROSOFT or -DCOMPILER=TURBOC on the command
  3911.    line.   This is needed only when compiling the CKITDEMO.C program.
  3912.    It is NOT needed when you are compiling your own door program.
  3913.  
  3914. Q. Do I have to include the -DCOMPILER-MICROSOFT or -DCOMPILER=TURBOC
  3915.    on the command line every time I compile my door program?
  3916.  
  3917. A. No, this was only needed for the CKITDEMO.C source code.  You can
  3918.    also modify the ckitdemo.c and ckitdemo.h file and take the compiler
  3919.    directives out if you like.  Then you would not have to use it when
  3920.    compiling the ckitdemo.c.  (Just make sure you take the right ones
  3921.    out for whichever compiler you are using). Matter fact, the way
  3922.    the defaults are defined in CKITDEMO.C, and CKITDEMO.H you don't
  3923.    need to have the -DCOMPILER=TURBOC when using TURBO C to compile
  3924.    the ckitdemo.c file or using Turbo C's IDE.
  3925.  
  3926. Q. My F4, F3, F7, ALT X, ALT N keys do not do have any effect when
  3927.    returning to the BBS.
  3928.  
  3929. A. These keys are valid only on doors or sysops using the pcboard.sys
  3930.    file.  When the code finds a door.sys or Wildcat! info files, it
  3931.    will make no attempt to update a pcboard.sys file.
  3932.    F5 shell to DOS, F8 return to BBS, F9 screen on/off will work
  3933.    with any system.  Try and write your door so that the sysop
  3934.    can use pcboard.sys if he is a PCBoard sysop but will also run
  3935.    on other systems as well.  Future updates will take into consideration
  3936.    other systems as permitted.  See the compatibility chart above.
  3937.  
  3938. Q. Why all the formfeeds in the documentation?
  3939.  
  3940. A. This is so that people with access to a copier can print them out,
  3941.    run the printed sheets thru the copier and duplex (print on both
  3942.    sides) the sheets into a manual.  If you do not want the form
  3943.    feeds, just do a global replacement with your favorite editor
  3944.    and get rid of them.
  3945.  
  3946. Q. I thought CKIT required that the users file path be listed also?
  3947.  
  3948. A. NO.  This was used for the CKITDEMO file only. CKIT
  3949.         library does not care one way or another about the users
  3950.         file being open.  CKITDEMO is also written to work with ANY
  3951.         system.  Ckitdemo is a demostration of how a door can be
  3952.         written to accept any command line given and make adjustments
  3953.         accordingly.  Ckitdemo will accept either:
  3954.         ckitdemo.exe c:\pcb\pcboard.sys c:\pcb\main\users
  3955.         ckitdemo.exe c:\pcb\door.sys
  3956.         ckitdemo.exe c:\wc\callinfo.bbs
  3957.         See the open_door() function for more information.
  3958.  
  3959.  
  3960. Q. Will CKIT work with any systems users file?
  3961.  
  3962. A. NO.  If you require information from the user file it must be
  3963.         be PCBoard 14.x or PCBoard 12.0.  However, by doing so
  3964.         you will be limiting your door to the number of systems
  3965.         it can be ran on.  I would not recommend using user file
  3966.         info unless your door is being written specifically for
  3967.         PCBoard.  Other system files (pcboard.dat, msgs and
  3968.         other systems users file) will be included in the form of
  3969.         source code at a later date.  This will allow you to
  3970.         link those with the existing CKIT library functions.
  3971.  
  3972. Q. What baud rates can CKIT can handle?
  3973.  
  3974. A.     Ckit can handle ANY baud rate from 50 baud to 230K baud.
  3975.        (these are the baud rates it has been used with).  The highest
  3976.        baud any standard IBM compt. system can produce is 115K
  3977.        baud.  The 230K baud was done on a modified IBM AT by changing
  3978.        the UART's xtal and using 16550A UARTs.
  3979.  
  3980. Q. I'm using MSC 6.0 and when I compile my program I get a message
  3981.    "warning 'NULL' : macro redefinition"?
  3982.  
  3983. A. This is not a problem.  It is actually a carry over from MSC5.1.
  3984.    If you wish, you can remove the line #define NULL = 0 in the CKIT.H
  3985.    header file. MSC 6.0 redefined their NULL assignment in the stdlib.h
  3986.    file which causes this.  You will not get the warning with MSC 5.1
  3987.    or lower and TURBO C.
  3988.  
  3989. Q. I'm using TURBOC and when I compile the small model demo program
  3990.    it works fine.  But when I re-compile using medium model I get
  3991.    stack overflow fixup errors from the linker.
  3992.  
  3993. A. TurboC does not delete and re-compile the CKITDEMO.C module.
  3994.    So when it attempts to link the older small model .obj file you created
  3995.    earlier with the medium library, you will get this error.  When
  3996.    you switch memory models, you must delete the previous .obj file
  3997.    created using the small memory model.  If this happened to be
  3998.    CKITDEMO.C, you would need to delete CKITDEMO.OBJ before changing
  3999.    memory models.
  4000.  
  4001. Q. Some function keys are not trapped locally.
  4002.  
  4003. A. Some keys are reserved on the local keyboard for sysop functions.
  4004.    Try to design your door without using the F3, F4, F5, F7, F8, F9
  4005.    ALT-H, ALT-N, ALT-X.   If you have to use these keys, they can
  4006.    be used by the remote keyboard but just be aware, you would not
  4007.    be able to use them on your local keyboard.
  4008.  
  4009. Q. When linking my program, I get an error -
  4010.    Unresolved external _wait.
  4011.  
  4012. A. This function was renamed to ck_wait in v1.7.  You need to
  4013.    be using the ckit.h header file.  There was a conflict with
  4014.    one of Borland's library names.
  4015.  
  4016. Q. When linking my code with the library in Turbo C, it does not
  4017.    find the ckit_t?.lib's.
  4018.  
  4019. A. I have found that TLINK seems to totally ignore the LIB= statement
  4020.    set in the enviroment.  The only solution I have for now is to
  4021.    put the ckit turbo libraries in the same dir. as your source code.
  4022.  
  4023. Q. Why does the user security level somtimes show on the status line
  4024.    and sometimes it doesn't?
  4025.  
  4026. A. PCBoard.sys file does not provide that information.  The security
  4027.    level will only show if you are using door.sys, callinfo.bbs  (WILDCAT!)
  4028.    or you are using pcboard.sys and open the users file.
  4029.    The status line indicators for pagebell, printer and caller alarm
  4030.    will also not show up if you are using door.sys or callinfo.bbs
  4031.    but will if you are using any version of pcboard.sys from 12.0 up.
  4032.  
  4033. Q. Will there be any kind of sign off message from CKIT after the program
  4034.    is registered?
  4035.  
  4036. A. After CKIT is registered, the only message displayed when closing the
  4037.    door will be the one you defined as exit_msg or the default msg
  4038.    "Returning to system ...".
  4039.